[gnome-settings-daemon] cursor: Disable if running under a wayland session



commit bf174acadc053a8ff2d6c4f4ef9ffd8fae53cd7f
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Oct 6 15:56:59 2014 +0200

    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738009

 plugins/cursor/gsd-cursor-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/cursor/gsd-cursor-manager.c b/plugins/cursor/gsd-cursor-manager.c
index f0f0f16..46cb0ca 100644
--- a/plugins/cursor/gsd-cursor-manager.c
+++ b/plugins/cursor/gsd-cursor-manager.c
@@ -40,6 +40,7 @@
 #define GNOME_DESKTOP_USE_UNSTABLE_API
 #include <libgnome-desktop/gnome-idle-monitor.h>
 
+#include "gnome-settings-bus.h"
 #include "gnome-settings-profile.h"
 #include "gsd-cursor-manager.h"
 #include "gsd-input-helper.h"
@@ -387,6 +388,11 @@ gsd_cursor_manager_start (GsdCursorManager  *manager,
 {
         GdkDeviceManager *device_manager;
 
+        if (gnome_settings_is_wayland ()) {
+                g_debug ("Running under a wayland compositor, disabling");
+                return TRUE;
+        }
+
         g_debug ("Starting cursor manager");
         gnome_settings_profile_start (NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]