[gnome-shell/wip/wayland: 49/53] Disable XDND when running as a wayland compositor



commit c79d66107d1f01c87e9b9d8acaac1a2d47351f21
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 11 17:50:18 2013 +0200

    Disable XDND when running as a wayland compositor
    
    We can't do xdnd on wayland easily, so let's disable this for 3.10
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707467

 js/ui/xdndHandler.js     |    4 +++-
 src/gnome-shell-plugin.c |    8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js
index 68da0bf..da6c18f 100644
--- a/js/ui/xdndHandler.js
+++ b/js/ui/xdndHandler.js
@@ -3,6 +3,7 @@
 const Clutter = imports.gi.Clutter;
 const Lang = imports.lang;
 const Main = imports.ui.main;
+const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
 const Signals = imports.signals;
 const DND = imports.ui.dnd;
@@ -20,7 +21,8 @@ const XdndHandler = new Lang.Class({
         Main.uiGroup.add_actor(this._dummy);
         this._dummy.hide();
 
-        global.init_xdnd();
+        if (!Meta.is_wayland_compositor())
+            global.init_xdnd();
 
         global.connect('xdnd-enter', Lang.bind(this, this._onEnter));
         global.connect('xdnd-position-changed', Lang.bind(this, this._onPositionChanged));
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 631e373..0c41c00 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -35,6 +35,7 @@
 #include <gjs/gjs.h>
 #include <meta/display.h>
 #include <meta/meta-plugin.h>
+#include <meta/util.h>
 
 #include "shell-global-private.h"
 #include "shell-perf-log.h"
@@ -343,8 +344,13 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
     }
 #endif
 
+#ifdef HAVE_WAYLAND
+  if (meta_is_wayland_compositor ())
+    return FALSE;
+#endif
+
   /*
-   * Pass the event to shell-global
+   * Pass the event to shell-global for XDND
    */
   if (_shell_global_check_xdnd_event (shell_plugin->global, xev))
     return TRUE;


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