Adamcake / Bolt

An alternative launcher for your favourite MMO
GNU Affero General Public License v3.0
122 stars 18 forks source link

Icon missing from window panel #18

Closed Allene0 closed 4 months ago

Allene0 commented 5 months ago

The bolt launcher icon shows up with the applets on the right panel, but instead of there being an icon for the active window it's a thin transparent box. I can pin the bolt launcher to the panel and click that, but it still opens up under that thin box. Runelite will also open up as the thin box but has the regular icon when run without the bolt launcher.

I'm using Linux Mint 21.3. When I set the button label to "Window Title" it shows as full width with no icon, but I'd prefer to have icons only in the panel.

image

Adamcake commented 5 months ago

Strange. Bolt and RuneLite both get their window icons from a WM_ICON property containing a list of pixel colours, so there's nothing about the environment that should change how it's displayed. Maybe there's something off about how your desktop environment interprets WM_ICONs.

Adamcake commented 5 months ago

Looks like this, for reference. If you want to try this yourself, open a terminal, run "xprop" and then click on the window you want to view. image

Allene0 commented 5 months ago

XKLAVIER_STATE(INTEGER) = 0, 1405294336 _NET_WM_STATE(ATOM) = WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _GTK_EDGE_CONSTRAINTS(CARDINAL) = 170 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 32, 0 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW _NET_WM_USER_TIME(CARDINAL) = 72727 WM_NORMAL_HINTS(WM_SIZE_HINTS): program specified location: 560, 380 WM_CLASS(STRING) = "BoltLauncher", "BoltLauncher" _NET_WM_ICON(CARDINAL) = Icon (16 x 16): ▓▓▓▓▓▓░░░░░░░░▓▓ ▓▓▓▓▓▓ ░░▒▓▓ ▓▓▓▓▓░ ░▒▓▓▓ ▓▓▓▓▓ ░░▓▓▓▓ ▓▓▓▓░ ░▓▓▓▓▓ ▓▓▓▓ ░▒▓▓▓▓▓ ▓▓▓▒ ░▒▓▓▓▓▓▓ ▓▓▓ ░░░░░▒▒▓ ▓▓▒ ░▓▓ ▓▓░ ░▓▓▓ ▓▓ ░▒▓▓▓▓ ▓▓▒▒▒▒░ ░▒▓▓▓▓▓ ▓▓▓▓▓▓░ ░▓▓▓▓▓▓▓ ▓▓▓▓▓▒ ░▓▓▓▓▓▓▓▓ ▓▓▓▓▓░▒▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

Icon (64 x 64):
████████████████████████████████████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████████
██████████████████████▓▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓███████████
██████████████████████▓░                   ░░░░░░░░▒▓███████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒                    ░░░░░░░░▓▓▓▓▓▓▓▓▓▓▒░▓
█████████████████████▓░                   ░░░░░░░░▓█████████████
████████████████████▓▒                   ░░░░░░░░▒▓█████████████
████████████████████▓░                   ░░░░░░░▒▓██████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒                   ░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████▓░                   ░░░░░░░▓████████████████
███████████████████▒                   ░░░░░░░▒▓████████████████
██████████████████▓░                  ░░░░░░░▒▓█████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓                   ░░░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
█████████████████▓▒                  ░░░░░░░▓███████████████████
█████████████████▓░                  ░░░░░░▓▓███████████████████
████████████████▓▒                  ░░░░░░▒▓████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░                 ░░░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████▓▒                  ░░░░░░▓██████████████████████
███████████████▓░                 ░░░░░░▓███████████████████████
███████████████▒                 ░░░░░░▒▓███████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░                 ░░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
██████████████▒                 ░░░░░░▓█████████████████████████
█████████████▓░                 ░░░░░▓██████████████████████████
█████████████▓                 ░░░░░▒▓██████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▒                ░░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
████████████▓░                ░░░░▒▓████████████████████████████
███████████▓▒                ░░░░░▓█████████████████████████████
███████████▓░                ░░░░▒▓█████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▒                ░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
██████████▓░                   ░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▓████████
██████████▒                                       ░░░░▒▓████████
█████████▓░                                      ░░░░▒▓█████████
▓▓▓▓▓▓▓▓▓▓                                      ░░░░▓▓▓▓▓▓▓▓▓▓▓▓
████████▓░                                     ░░░▒▓████████████
████████▓                                     ░░░▒▓█████████████
███████▓▒                                    ░░░▒▓██████████████
▓▓▓▓▓▓▓▓░                                   ░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████▒                                  ░░░▒▓█████████████████
██████▓░                                 ░░░▒▓██████████████████
██████▒                                 ░░░▓▓███████████████████
▓▓▓▓▓▓░                                ░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
█████▒                                ░░▒▓██████████████████████
████▓▒   ░░░░░░░░░░░░░░░░            ░░▒▓███████████████████████
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒           ░░▓▓████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░         ░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████████▓         ░░▒▓███████████████████████████
██████████████████████▓░        ░░▓▓████████████████████████████
██████████████████████▓░       ░▒▓██████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒       ░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
█████████████████████▓░     ░░▒▓████████████████████████████████
████████████████████▓▒     ░░▓▓█████████████████████████████████
████████████████████▓░    ░▒▓███████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒    ░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████▓░   ░▓▓█████████████████████████████████████
███████████████████▒  ░▒▓███████████████████████████████████████
██████████████████▓░ ░▒▓████████████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
█████████████████▓▒░▓▓██████████████████████████████████████████
█████████████████▓▓▓████████████████████████████████████████████
████████████████████████████████████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████

_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0 XdndAware(ATOM) = BITMAP _NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2 WM_NAME(UTF8_STRING) = _NET_WM_NAME(UTF8_STRING) = _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL _NET_WM_PID(CARDINAL) = 2 WM_CLIENT_MACHINE(STRING) = "Nebula" WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST image

Allene0 commented 5 months ago

I'm using cinnamon desktop environment so it could be something to do with that, but other flatpak applications have their icons

Adamcake commented 5 months ago

Since you said RuneLite's icon works when not using Bolt, can you check if there's any difference in the xprop output for RuneLite when its icon works versus when it doesn't?

Allene0 commented 5 months ago

Doesn't look to be much difference.

Regular Runelite: XKLAVIER_STATE(INTEGER) = 0, 1405294336 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _GTK_EDGE_CONSTRAINTS(CARDINAL) = 170 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL _OL_DECOR_DEL(ATOM) = _OL_DECOR_HEADER, _OL_DECOR_RESIZE, _OL_DECOR_CLOSE _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x0, 0x0, 0x0 _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x30, 0x0, 0xc0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 XdndAware(ATOM) = BITMAP _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 32, 0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED WM_HINTS(WM_HINTS): Client accepts input or input focus: False Initial state is Normal State. _NET_WM_ICON(CARDINAL) = Icon (128 x 128):

(Large icon here)

_NET_WM_PID(CARDINAL) = 63288 WM_CLIENT_MACHINE(STRING) = "Nebula" WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS WM_CLASS(STRING) = "net-runelite-client-RuneLite", "net-runelite-client-RuneLite" WM_CLIENT_LEADER(WINDOW): window id # 0x7c00008 _NET_WM_ICON_NAME(UTF8_STRING) = "RuneLite" WM_ICON_NAME(STRING) = "RuneLite" _NET_WM_NAME(UTF8_STRING) = "RuneLite" WM_NAME(STRING) = "RuneLite" WM_NORMAL_HINTS(WM_SIZE_HINTS): user specified location: 2460, 279 program specified location: 2460, 279 program specified size: 1440 by 924 program specified minimum size: 806 by 536 window gravity: NorthWest

The window run through Bolt, which is grouped together with the bolt launcher in the panel:

XKLAVIER_STATE(INTEGER) = 0, 1405294336 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _GTK_EDGE_CONSTRAINTS(CARDINAL) = 170 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL _OL_DECOR_DEL(ATOM) = _OL_DECOR_HEADER, _OL_DECOR_RESIZE, _OL_DECOR_CLOSE _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x0, 0x0, 0x0 _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x30, 0x0, 0xe0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 XdndAware(ATOM) = BITMAP _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 32, 0 _NET_WM_STATE(ATOM) = WM_HINTS(WM_HINTS): Client accepts input or input focus: False Initial state is Normal State. _NET_WM_ICON(CARDINAL) = Icon (128 x 128):

(Large icon here)

_NET_WM_PID(CARDINAL) = 128 WM_CLIENT_MACHINE(STRING) = "Nebula" WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS WM_CLASS(STRING) = "net-runelite-client-RuneLite", "net-runelite-client-RuneLite" WM_CLIENT_LEADER(WINDOW): window id # 0x6e00008 _NET_WM_ICON_NAME(UTF8_STRING) = "RuneLite" WM_ICON_NAME(STRING) = "RuneLite" _NET_WM_NAME(UTF8_STRING) = "RuneLite" WM_NAME(STRING) = "RuneLite" WM_NORMAL_HINTS(WM_SIZE_HINTS): user specified location: 151, 216 program specified location: 151, 216 program specified size: 1440 by 924 program specified minimum size: 806 by 536 window gravity: NorthWest

And this is how the panel looks with bolt launcher, Runelite launched through bolt, and runelite.jar run from the bolt-launcher directory:

image

runelite.jar is the one with the icon, bolt launcher and bolt launched Runelite are grouped in that thin rectangle with the (2)

Allene0 commented 5 months ago

If I ungroup the windows and display window titles, the three look like this: image

I did notice just one difference when run through runelite.jar, it uses ~/.runelite for instead of ~/.var/app/com.adamcake.Bolt/data/bolt-launcher/.runelite for things like plugins, screenshots, settings.

Adamcake commented 5 months ago

it uses ~/.runelite for instead of ~/.var/app/com.adamcake.Bolt/data/bolt-launcher/.runelite Yes, that's intentional, I redirect the .runelite folder into an XDG-conforming location that's controlled by Bolt. It shouldn't affect the icon.

If WM_ICON/_NET_WM_ICON is the same in both cases then there's no reason to suspect it would have different behaviour. This might be worth asking the Cinnamon DE devs about.

Allene0 commented 5 months ago

I noticed that bolt launcher was using a RuneScape.desktop file, and that file referred to a "runescape" icon. Since this icon didn't exist I saved an OSRS icon PNG, put that file in /usr/share/icons and named it runescape.png and it actually worked image

Adamcake commented 5 months ago

The runescape.desktop file and the runescape icon entries it refers to are for RS3, the icons would get downloaded with the RS3 client if you clicked play on it. The .desktop is always there though.

Basically there are two ways for desktop environments to figure out what icon to put on a window. The common one is to try to figure out what .desktop file it was launched from and look at the Icon entry in that file. The less common one is to set the icon directly as a window property, which is what WM_ICON is in X11. WM_ICON is supposed to override the .desktop thing, but it's sounding like Cinnamon just doesn't support it.

But as you've found, there is nothing to stop you creating your own .desktop and icon entries for RuneLite, if you want to.

Adamcake commented 5 months ago

And when you install RuneLite directly it comes with a .desktop and icon file, which explains why it works for you: https://github.com/runelite/launcher/tree/master/appimage

Adamcake commented 4 months ago

Took a look at this today. I do get the same issue on a fresh install of Linux Mint, but then after installing Cinnamon on my existing Gentoo system, it instead showed the RS3 icon for Bolt. The only possible explanation for this is that it's somehow associating RuneScape.desktop to Bolt despite them being completely unconnected.

I looked for a way to raise this with Cinnamon but the only way seems to be their generic Github page, which, considering it has 1600 open issues, I don't hold out much hope for getting any kind of response.

Allene0 commented 4 months ago

I did mention it using runescape.desktop, I didn't know that was unintentional. At least for cinnamon we do have a workaround:

By saving runelite.png from https://github.com/runelite/launcher/tree/master/appimage and placing it in /usr/share/icons then renaming it to "runescape.png" Bolt launcher and anything it runs will then have Runelite's icon.

It works ok since I only use Runelite anyway and it's easier than trying to get the cinnamon devs to resolve a bug on their end

Adamcake commented 4 months ago

This helps a little, but it still gets RuneLite's icon wrong (your fix will still work though.) There's nothing more I can do to work around this; Cinnamon's handling of XDG_DATA_DIRS is unfortunately just bad.

Allene0 commented 4 weeks ago

As of 0.9 this is fixed, workaround is no longer necessary