[gnome-shell/wip/wayland: 157/160] ShellGlobal: avoid one use of ClutterX11



commit 6c09af92433b1e433fd0ec0884c8f3c1d1414e8d
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Tue Aug 13 14:22:30 2013 +0200

    ShellGlobal: avoid one use of ClutterX11
    
    clutter_x11_get_stage_window() will abort if clutter is not
    using the x11 backend (such as when running under DRM). We already
    have a fake X window in ShellGlobal, let's use that instead.

 src/shell-global.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index a969bbe..f538506 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -877,11 +877,11 @@ gnome_shell_gdk_event_handler (GdkEvent *event_gdk,
 {
   if (event_gdk->type == GDK_KEY_PRESS || event_gdk->type == GDK_KEY_RELEASE)
     {
-      ClutterActor *stage;
+      ShellGlobal *global;
       Window stage_xwindow;
 
-      stage = CLUTTER_ACTOR (data);
-      stage_xwindow = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
+      global = data;
+      stage_xwindow = global->stage_xwindow;
 
       if (GDK_WINDOW_XID (event_gdk->key.window) == stage_xwindow)
         {
@@ -893,7 +893,7 @@ gnome_shell_gdk_event_handler (GdkEvent *event_gdk,
                                                            CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE);
           event_clutter->key.time = event_gdk->key.time;
           event_clutter->key.flags = CLUTTER_EVENT_NONE;
-          event_clutter->key.stage = CLUTTER_STAGE (stage);
+          event_clutter->key.stage = CLUTTER_STAGE (global->stage);
           event_clutter->key.source = NULL;
 
           /* This depends on ClutterModifierType and GdkModifierType being
@@ -993,7 +993,7 @@ _shell_global_set_plugin (ShellGlobal *global,
   g_signal_connect (global->meta_display, "notify::focus-window",
                     G_CALLBACK (focus_window_changed), global);
 
-  gdk_event_handler_set (gnome_shell_gdk_event_handler, global->stage, NULL);
+  gdk_event_handler_set (gnome_shell_gdk_event_handler, global, NULL);
 
   global->focus_manager = st_focus_manager_get_for_stage (global->stage);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]