GNOME Bugzilla – Bug 738009
cursor: Disable if running under a wayland session
Last modified: 2015-01-28 13:50:58 UTC
Adding the global function to gnome-settings-bus.h is a bit of stretch but I didn't want to create a new file just for this. I'd like to include this in 3.14.1 because otherwise wayland sessions feel broken since most applications default to run through XWayland.
Created attachment 287854 [details] [review] daemon: Add a check for wayland sessions We want to do some things differently, or disable some features entirely, when running under a wayland session. Adding a global function which tries to connect to a wayland compositor using the same method as a regular wayland client allows us to achieve that. For now, since we don't need to do anything else with the wayland connection we tear it down immediately after checking. Note that g-s-d uses the X11 GDK backend exclusively so there's no danger of this being a duplicated wayland connection. This commit introduces an optional build time dependency on libwayland-client which is, by default, enabled or disabled automatically depending on the pc file existence.
Created attachment 287855 [details] [review] cursor: Disable if running under a wayland session This plugin is harmful in a wayland session because it tells XWayland to never show a cursor which results in mutter always using the default cursor on X clients, e.g. the cursor doesn't change to a caret on text widgets and doesn't change to the resize cursor on window edges for those clients' windows. The reason why the plugin doesn't work is that it uses the GDK device manager to enumerate devices which only knows about the virtual XWayland devices and then tries to use those devices to ask for idle monitors on them through the gnome-desktop API which calls out to mutter through DBus, but mutter doesn't know about those devices since it's managing the devices itself. Basically, this plugin's functionality needs to be implemented by mutter itself when running as a native wayland compositor.
Discussed with Matthias on IRC and decided to push this for now so that we don't forget about it for 3.14.1 . Will revisit afterwards. Attachment 287854 [details] pushed as 6c2bbfc - daemon: Add a check for wayland sessions Attachment 287855 [details] pushed as bf174ac - cursor: Disable if running under a wayland session
Filed https://bugzilla.gnome.org/show_bug.cgi?id=743645 for gnome-shell to implement this for wayland.
*** Bug 732749 has been marked as a duplicate of this bug. ***