[mutter] backend-x11: Don't use clutter_stage_get_default
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backend-x11: Don't use clutter_stage_get_default
- Date: Wed, 23 Apr 2014 20:01:25 +0000 (UTC)
commit 01a773ed5a05d9cfb5edec5ab707fc3ee41e36f4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 23 14:50:27 2014 -0400
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 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index d47c83d..9533ece 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 <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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]