diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-04-21 19:47:04 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-04-21 20:25:21 -0400 |
commit | 48dc544beff407b5502fae32c3259d87c8e31b0c (patch) | |
tree | 1224c78c850a9dcd52c609d0938fe60848254473 /src/backends/x11 | |
parent | 31d744195d8cb5f7366326c3990cf84f83bf6a6c (diff) | |
download | mutter-48dc544beff407b5502fae32c3259d87c8e31b0c.tar.gz |
backends: Move most of the code from meta_backend_init into the subclasses
Diffstat (limited to 'src/backends/x11')
-rw-r--r-- | src/backends/x11/meta-backend-x11.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index 35e8416a2..61de4443d 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -26,6 +26,10 @@ #include "meta-backend-x11.h" +#include <gdk/gdkx.h> +#include <clutter/x11/clutter-x11.h> + +#include <meta/util.h> #include "meta-idle-monitor-xsync.h" G_DEFINE_TYPE (MetaBackendX11, meta_backend_x11, META_TYPE_BACKEND); @@ -50,6 +54,23 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass) static void meta_backend_x11_init (MetaBackendX11 *x11) { + /* When running as an X11 compositor, we install our own event filter and + * pass events to Clutter explicitly, so we need to prevent Clutter from + * handling our events. + * + * However, when running as a Wayland compostior under X11 nested, Clutter + * Clutter needs to see events related to its own window. We need to + * eventually replace this with a proper frontend / backend split: Clutter + * under nested is connecting to the "host X server" to get its events it + * needs to put up a window, and GTK+ is connecting to the "inner X server". + * The two would the same in the X11 compositor case, but not when running + * XWayland as a Wayland compositor. + */ + if (!meta_is_wayland_compositor ()) + { + clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + clutter_x11_disable_event_retrieval (); + } } void |