-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wayland] Urn crashes on launch when global hotkeys are enabled #9
Comments
Thanks for reporting. I'm unable to reproduce this issue (Debian 12 x86_64). It seems it is related to your x11 shared libraries rather than urn itself
Try updating your system packages/drivers, and if doesn't work, can you share the environment information on which you are running the application? |
This may be wayland-related, apparently this only happens when using plasma-wayland-session and not on the default Plasma X11 session. |
Not very familiar with the wayland ecosystem, but it might be a good idea if you report the problem on the Wayland Plasma forums, because GTK should be compatible with it. I'd appreciate some guidance as to whether this issue can be addressed on this side somehow. Also see the GDK_BACKEND=x11 env variable. Here is the relevant block of code that is triggered when global hotkeys are enable Lines 503 to 539 in 70cc5bf
|
Setting GDK_BACKEND to x11 does indeed allow urn to start but then global hotkeys don't work (so it's just like launching it with global-hotkeys set to false) |
So I found this issue from another GTK3 based project, the same what you described: Basically, not much can be done on this side. Wayland seems to not support global hotkeys. Currently how global hotkeys are managed will depend on the desktop environment you are using. This issue from tauri links relevant discussions for some popular desktop environments, including KDE. Also see this blog entry from a KDE dev about KDE Plasma 6
|
So users dealing with this issue should rely on the workarounds of their desktop environments. I'll need to write a warning on the readme linking this issue for future wayland users, and maybe print some warning logs when running urn on wayland because global hotkeys won't work for them. About the crash, I couldn't find something conclusive about what I should do, so I think I'll be forcing the GDK_BACKEND variable to x11 for now, maybe later, you can send a pull request if you wish to. |
The way to do global hotkeys in Wayland is … not to do global hotkeys. Instead, have command line options for the stuff you would usually hotkey; e.g. Reason being that, by design and for quite basic security reasons, applications cannot receive keyboard input if they are not in focus. |
Starting on Wayland with global hotkeys enabled should not crash. Maybe add a check if the program is running on Wayland and don't enable the global hotkey feature if Wayland is detected. |
Thanks for the insights @alterNERDtive. #19 was created to address this need. |
On Nobora 40 (Fedora 40, KDE 6.1), if I remove the if conditional checking for wayland, global hotkeys work just fine. Could there be a compile flag or something so Wayland users can at least try global hotkeys. |
When global-hotkeys is set to true, urn segfaults on launch. Setting it to false allows it to start normally.
Backtrace:
The text was updated successfully, but these errors were encountered: