After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738009 - cursor: Disable if running under a wayland session
cursor: Disable if running under a wayland session
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 732749 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-06 14:19 UTC by Rui Matos
Modified: 2015-01-28 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
daemon: Add a check for wayland sessions (4.59 KB, patch)
2014-10-06 14:19 UTC, Rui Matos
committed Details | Review
cursor: Disable if running under a wayland session (1.95 KB, patch)
2014-10-06 14:19 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-10-06 14:19:41 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.
Comment 1 Rui Matos 2014-10-06 14:19:44 UTC
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.
Comment 2 Rui Matos 2014-10-06 14:19:49 UTC
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.
Comment 3 Rui Matos 2014-10-10 16:34:40 UTC
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
Comment 4 Bastien Nocera 2015-01-28 13:50:52 UTC
Filed https://bugzilla.gnome.org/show_bug.cgi?id=743645 for gnome-shell to implement this for wayland.
Comment 5 Bastien Nocera 2015-01-28 13:50:58 UTC
*** Bug 732749 has been marked as a duplicate of this bug. ***