[gnome-shell] shell-global: Remove grab notifier



commit 5ce8980db338302f5b32671d85af22f07f011859
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Aug 13 18:04:48 2014 -0400

    shell-global: Remove grab notifier
    
    With the window menus gone, it is no longer possible to have a GTK+ grab
    in-process, so remove our code that was tracking GTK+ grabs.

 src/shell-global.c |   31 +------------------------------
 1 files changed, 1 insertions(+), 30 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 8a5c9f3..1e65530 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -46,8 +46,6 @@
 
 static ShellGlobal *the_object = NULL;
 
-static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
-
 struct _ShellGlobal {
   GObject parent;
 
@@ -63,15 +61,6 @@ struct _ShellGlobal {
 
   char *session_mode;
 
-  /* We use this window to get a notification from GTK+ when
-   * a widget in our process does a GTK+ grab.  See
-   * http://bugzilla.gnome.org/show_bug.cgi?id=570641
-   * 
-   * This window is never mapped or shown.
-   */
-  GtkWindow *grab_notifier;
-  gboolean gtk_grab_active;
-
   XserverRegion input_region;
 
   GjsContext *js_context;
@@ -285,10 +274,6 @@ shell_global_init (ShellGlobal *global)
   global->runtime_state_path = g_file_new_for_path (path);
 
   global->settings = g_settings_new ("org.gnome.shell");
-  
-  global->grab_notifier = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
-  g_signal_connect (global->grab_notifier, "grab-notify", G_CALLBACK (grab_notify), global);
-  global->gtk_grab_active = FALSE;
 
   global->sound_context = ca_gtk_context_get ();
   ca_context_change_props (global->sound_context,
@@ -348,7 +333,6 @@ shell_global_finalize (GObject *object)
   ShellGlobal *global = SHELL_GLOBAL (object);
 
   g_object_unref (global->js_context);
-  gtk_widget_destroy (GTK_WIDGET (global->grab_notifier));
   g_object_unref (global->settings);
 
   the_object = NULL;
@@ -654,9 +638,7 @@ sync_input_region (ShellGlobal *global)
 {
   MetaScreen *screen = global->meta_screen;
 
-  if (global->gtk_grab_active)
-    meta_empty_stage_input_region (screen);
-  else if (global->has_modal)
+  if (global->has_modal)
     meta_set_stage_input_region (screen, None);
   else
     meta_set_stage_input_region (screen, global->input_region);
@@ -1336,17 +1318,6 @@ shell_global_notify_error (ShellGlobal  *global,
   g_signal_emit_by_name (global, "notify-error", msg, details);
 }
 
-static void
-grab_notify (GtkWidget *widget, gboolean was_grabbed, gpointer user_data)
-{
-  ShellGlobal *global = SHELL_GLOBAL (user_data);
-  
-  global->gtk_grab_active = !was_grabbed;
-
-  /* Update for the new setting of gtk_grab_active */
-  sync_input_region (global);
-}
-
 /**
  * shell_global_init_xdnd:
  * @global: the #ShellGlobal


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