Wayland: Set app_id for icon in kde #718
Loading…
Reference in a new issue
No description provided.
Delete branch "wl_icon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
KDE requires set_app_id to be called to display the app icon.
I don't know if there's a way to set this value in wxWidgets, in Gtk it's for each window by the GtkApplication
This hack set's it directly for a Gtk window.
Currently it's only applied to the main window and the GamePad window but ideally it would run after
Show
for each toplevel window (wxFrame
).The
gdk_wayland_window_set_application_id
function was added in gtk3.24.22
. Ubuntu 20.04 LTS supports3.24.18
and with updates3.24.20
. Therefore the function call will be dynamic.HAS_WAYLAND only indicates compile time support for Wayland, the actual window still might end up using X11. I recommend adding an extra check like this:
And then implement wxWlIsWaylandWindow like this:
Note that this code is untested and I wrote it off the top of my head. You could also avoid the extra function and check inside
wxWlSetAppId
directly, but personally I think conditionally calling wxWlSetAppId makes it more obvious that the window isn't always wayland baked.Seems like
gdk_wayland_window_set_application_id
was added with GTK 3.24 but the ubuntu package that we build with is only 3.0You could change the call to be conditional at runtime and not rely on
gdk_wayland_window_set_application_id
being present in headers:The build is on Ubuntu 20.04 LTS which is might be GTK 3.24.18 (20.04 libs).
Seems the function was merged 2 years ago.
I'll make the function call dynamic, but would there be any downside to bumping the build image to 22.04 LTS?
Yeah not sure whats going on. In the log I saw 3.0 somewhere. But the function is definitively not available in the headers we include. So maybe the dev package is outdated but GTK itself isn't. Granted, I only did a surface level check.
It would lock out anyone trying to compile on 20.04. Might also affect the base requirements of the appimage but I'm not sure whether it comes with its own GTK or not.
instead of
application_Id
Assuming this is the last issue I'll commit it right away
Hah, I have that on my working tree. I guess I forgot to
git add
.I've got nothing else to add, merge it :)