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
This commit is contained in:
Giovanni Campagna 2013-09-11 17:50:18 +02:00
parent 9d1f789937
commit 4db6e70f97
2 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,7 @@
const Clutter = imports.gi.Clutter; const Clutter = imports.gi.Clutter;
const Lang = imports.lang; const Lang = imports.lang;
const Main = imports.ui.main; const Main = imports.ui.main;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const DND = imports.ui.dnd; const DND = imports.ui.dnd;
@ -20,6 +21,7 @@ const XdndHandler = new Lang.Class({
Main.uiGroup.add_actor(this._dummy); Main.uiGroup.add_actor(this._dummy);
this._dummy.hide(); this._dummy.hide();
if (!Meta.is_wayland_compositor())
global.init_xdnd(); global.init_xdnd();
global.connect('xdnd-enter', Lang.bind(this, this._onEnter)); global.connect('xdnd-enter', Lang.bind(this, this._onEnter));

View File

@ -35,6 +35,7 @@
#include <gjs/gjs.h> #include <gjs/gjs.h>
#include <meta/display.h> #include <meta/display.h>
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
#include <meta/util.h>
#include "shell-global-private.h" #include "shell-global-private.h"
#include "shell-perf-log.h" #include "shell-perf-log.h"
@ -343,8 +344,13 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
} }
#endif #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)) if (_shell_global_check_xdnd_event (shell_plugin->global, xev))
return TRUE; return TRUE;