[gnome-panel/gtk3] Fix build with -DGSEAL_ENABLED



commit 53408762fbb6ddd2c936bf023fa3a00631e4db8c
Author: Germán Póo-Caamaño <gpoo gnome org>
Date:   Mon Jan 10 23:00:22 2011 -0800

    Fix build with -DGSEAL_ENABLED
    
    Wanda: don't forget to port me.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=612481
    
    Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>

 applets/wncklet/window-menu.c |    4 ++++
 gnome-panel/menu.c            |   12 ++++++++++--
 gnome-panel/panel-menu-bar.c  |    4 ++++
 3 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c
index 0549d50..87553d4 100644
--- a/applets/wncklet/window-menu.c
+++ b/applets/wncklet/window-menu.c
@@ -209,11 +209,15 @@ window_menu_key_press_event (GtkWidget   *widget,
 		 * As that function is private its code is replicated here.
 		 */
 		menu_shell = GTK_MENU_SHELL (selector);
+		/* FIXMEgpoo: We need either accessors or a workaround
+		   to grab the focus */
+#if 0
 		if (!menu_shell->GSEAL(active)) {
 			gtk_grab_add (GTK_WIDGET (menu_shell));
 			menu_shell->GSEAL(have_grab) = TRUE;
 			menu_shell->GSEAL(active) = TRUE;
 		}
+#endif
 		gtk_menu_shell_select_first (menu_shell, FALSE);
 		return TRUE;
 	default:
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index da8bb52..c3a580a 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -841,6 +841,9 @@ restore_grabs(GtkWidget *w, gpointer data)
 	}
 
 	/*only grab if this HAD a grab before*/
+	/* FIXMEgpoo: We need either accessors or a workaround to grab
+	   the focus */
+#if 0
 	if (xgrab_shell && (GTK_MENU_SHELL (xgrab_shell)->GSEAL(have_xgrab)))
           {
 	    GdkWindow *window = gtk_widget_get_window (xgrab_shell);
@@ -859,7 +862,7 @@ restore_grabs(GtkWidget *w, gpointer data)
 		  gdk_pointer_ungrab (GDK_CURRENT_TIME);
 	      }
          }
-	
+#endif
 	gtk_grab_add (GTK_WIDGET (menu));
 }
 
@@ -1083,7 +1086,12 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext     *context)
 	{
 	  if (gdk_keyboard_grab (window, TRUE,
 				 GDK_CURRENT_TIME) == 0)
-	    GTK_MENU_SHELL (xgrab_shell)->GSEAL(have_xgrab) = TRUE;
+	    /* FIXMEgpoo: We need either accessors or a workaround to grab
+	       the focus */
+#if 0
+	     GTK_MENU_SHELL (xgrab_shell)->GSEAL(have_xgrab) = TRUE;
+#endif
+	      g_message ("xgrab\n");
 	  else
 	    {
 	      gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index 26be21a..ed7e87b 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -441,11 +441,15 @@ panel_menu_bar_popup_menu (PanelMenuBar *menubar,
 	 * As that function is private its code is replicated here.
 	 */
 	menu_shell = GTK_MENU_SHELL (menubar);
+	/* FIXMEgpoo: We need either accessors or a workaround to
+	   grab the focus  */
+#if 0
 	if (!menu_shell->GSEAL(active)) {
 		gtk_grab_add (GTK_WIDGET (menu_shell));
 		menu_shell->GSEAL(have_grab) = TRUE;
 		menu_shell->GSEAL(active) = TRUE;
 	}
+#endif
 	gtk_menu_shell_select_item (menu_shell,
 				    gtk_menu_get_attach_widget (menu));
 }



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