From 01a773ed5a05d9cfb5edec5ab707fc3ee41e36f4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 23 Apr 2014 14:50:27 -0400 Subject: [PATCH] backend-x11: Don't use clutter_stage_get_default It turns out Clutter doesn't actually set the stage as the default when creating a new one, so this creates a new stage that then dies. --- src/backends/x11/meta-backend-x11.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index d47c83de7..9533eceb2 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -37,6 +37,8 @@ #include "meta-cursor-tracker-private.h" #include "meta-cursor.h" #include +#include "display-private.h" +#include "compositor/compositor-private.h" struct _MetaBackendX11Private { @@ -95,7 +97,9 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11, case XI_KeyPress: case XI_KeyRelease: { - ClutterStage *stage = CLUTTER_STAGE (clutter_stage_get_default ()); + MetaDisplay *display = meta_get_display (); + MetaCompositor *compositor = display->compositor; + ClutterStage *stage = CLUTTER_STAGE (compositor->stage); device_event->event = clutter_x11_get_stage_window (stage); break; }