network-manager-applet r1071 - in branches/NETWORKMANAGER_APPLET_0_7: . src



Author: dcbw
Date: Thu Dec 11 21:42:14 2008
New Revision: 1071
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1071&view=rev

Log:
2008-12-11  Dan Williams  <dcbw redhat com>

	* src/applet.c
		- (applet_pre_keyring_callback): handle right-click menu too



Modified:
   branches/NETWORKMANAGER_APPLET_0_7/ChangeLog
   branches/NETWORKMANAGER_APPLET_0_7/src/applet.c

Modified: branches/NETWORKMANAGER_APPLET_0_7/src/applet.c
==============================================================================
--- branches/NETWORKMANAGER_APPLET_0_7/src/applet.c	(original)
+++ branches/NETWORKMANAGER_APPLET_0_7/src/applet.c	Thu Dec 11 21:42:14 2008
@@ -2328,11 +2328,10 @@
 applet_pre_keyring_callback (gpointer user_data)
 {
 	NMApplet *applet = NM_APPLET (user_data);
+	GdkScreen *screen;
+	GdkDisplay *display;
 
 	if (applet->menu && applet->menu->window) {
-		GdkScreen *screen;
-		GdkDisplay *display;
-
 		screen = gdk_drawable_get_screen (applet->menu->window);
 		display = gdk_screen_get_display (screen);
 		g_object_ref (display);
@@ -2349,6 +2348,22 @@
 		gdk_display_sync (display);
 		g_object_unref (display);
 	}
+
+	if (applet->context_menu && applet->context_menu->window) {
+		screen = gdk_drawable_get_screen (applet->context_menu->window);
+		display = gdk_screen_get_display (screen);
+		g_object_ref (display);
+
+		gtk_widget_hide (applet->context_menu);
+
+		/* Ensure that the widget really gets hidden before letting the
+		 * keyring calls happen; if the X events haven't all gone through when
+		 * the keyring dialog comes up, then the menu will actually still have
+		 * the screen grab even after we've called gtk_widget_hide().
+		 */
+		gdk_display_sync (display);
+		g_object_unref (display);
+	}
 }
 
 static GObject *



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