Run on Xwayland by default #172
Comments
This looks very promising, indeed. I did not know about this! I guess that it is possible that GDK is compiled without the x11 backend. Do you know a possibility to check whether we're actually running on Xwayland after setting the Another question: Why do we need to set As this is kind of an important contribution I suggest that you create a proper pull request and add yourself also to aboutWindow.vala and the AUTHORS file! Thank you very much! |
According to the documentation that should be possible: With these options available, I think we can make the code more robust and have proper fallbacks in place without much refactoring.
You're correct. I originally added I'll be doing PR's soon, just give me a few days to test things more thoroughly on Debian/Ubuntu too, as I developed and run this on Arch Linux for now. The coming week I can dedicate all the time it takes to tackle this and clean-up any crudely introduced code. Please feel free to comment, suggest alternatives etcetera. |
@Simmesimme PR's are in. I made a name change in the environment variable to determine the These are randomly picked names, so you can change these to whatever you feel is appropriate. Just make sure to update the files touched by this PR accordingly when you decide to change them. Due to my lack of CMake experience I didn't integrate the newly introduced |
I played around a bit (and fixed the window list group on Xwayland) and observed one issue: Gnome-Pie seems to work on Xwayland only when another application which also runs on Xwayland has currently input focus. For example, it works when Firefox is in focus but doesn't when Nautilus is focused. Did I miss something or do you experience the same? I am using Ubuntu 19.04 with vanilla Gnome Shell currently. |
I run Firefox with After some trial and error, I did manage to get good results with Firefox on x11 and nautilus running on wayland by default. The only file needing additional changes was pieWindow.vala. Here's my diff:
Please test the patch, I don't understand why it had |
Response to Schneegans#172 (comment). The issues observed should now be fixed.
Sadly, this does not change the behavior for me. Still, when I run Gnome-Pie on Gnome Shell under Wayland, Gnome-Pie's hotkeys only work if certain applications have focus. I assume that those appliactions run on XWayland too - with Also, when I move the mouse pointer to another location on the screen (without clicking, so the previously focused XWayland application keeps having the input focus), the pies open where my pointer left the XWayland application. |
@Schneegans During the weekend I had some more time to delve into this focus/hotkey/mouse pointer issue. I removed all my GNOME tweaks/customizations to get as closely to your own setup as possible. First off, I can indeed replicate your latest findings. If my understanding of the issue is correct, we'll need to ensure there's always a focused Xwayland application window open prior to calling GP('s hotkeys). I made a smallish On a side-note, this routine also works for me in a gnome-shell extension I use called custom-hot-corners, so the user can call GP commands via pointer hotzones too if so desired. That's just a personal preference though, just a FYI. As already hinted to above, if this works to your satisfaction, we'll need to integrate all this into GP (to avoid adding additional executables). I believe this is possible, for example by adding a command line option to run the invisible-but-focused Xwayland window prior to calling hotkeys. The shell script could be integrated via Posix.system calls and/or rewriting it as another vala file being part of GP. I haven't done this yet, just to avoid more mishaps and non-functioning PR's. Would be nice if you could test GP with these temporary files. Please feel free to ask if anything isn't clear or whatever you feel needs to be tackled. |
I think we should wait with this some more. As the APIs evolve, there may be native possibilities on Wayland to achieve what we want without major hacks. For example, https://developer.gnome.org/clutter/unstable/ClutterInputDevice.html looks quite promising. |
Hi, I've been running Gnome-Pie (GP) for ages and love its functionality. But when running a GNOME Wayland session the application is somewhat crippled (as ~/.config/gnome-pie/gnome-pie.log kindly warns about). Several issues here mention/relate to this Wayland problem already. For fun I tried using GP on
Xwayland
, in an attempt to mitigate the known/documented shortcomings. I do realize this isn't fully futureproof, but IMHO the Xwayland backend isn't poised to disappear any time soon.At first this didn't work, simply because the current code has GP running on Wayland
by default
. This is due to using a construct like:GLib.Environment.get_variable("XDG_SESSION_TYPE") == "wayland"
throughout the codebase. When changing this to use the documented
CLUTTER_BACKEND
andGDK_BACKEND
environment vars, things nicely fall into place and GP starts to shine again, as it should.A crude, but working patchset to use GP on Xwayland by default can be found here. Please note these patches were made against 0.7.2. If there's interest to integrate this into GP, I'll be happy to help in preparing the needed PR's. All this shouldn't discourage devs to create a GNOME extension as proposed in #147, but it might be a nice workaround until such is ready.
The text was updated successfully, but these errors were encountered: