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.
This commit is contained in:
Jasper St. Pierre 2014-04-23 14:50:27 -04:00
parent 2435d132ac
commit 01a773ed5a

View File

@ -37,6 +37,8 @@
#include "meta-cursor-tracker-private.h"
#include "meta-cursor.h"
#include <meta/util.h>
#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;
}