LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gnome-panel-alt-f1-slab.patch of Package gnome-panel-nld (Project home:winddss:gnome-panel-nld)

--- gnome-panel-2.12.2-orig/gnome-panel/panel-action-protocol.c	2005-01-12 05:16:41.000000000 +0100
+++ gnome-panel-2.12.2/gnome-panel/panel-action-protocol.c	2006-05-11 15:01:49.000000000 +0200
@@ -50,6 +50,7 @@ panel_action_protocol_main_menu (GdkScre
 	PanelWidget *panel_widget;
 	GtkWidget   *menu;
 	AppletInfo  *info;
+	gchar       *path;
 
 	info = panel_applet_get_by_type (PANEL_OBJECT_MENU_BAR, screen);
 	if (info) {
@@ -65,6 +66,36 @@ panel_action_protocol_main_menu (GdkScre
 		return;
 	}
 
+	path = g_find_program_in_path ("application-browser");
+	if (path) {
+		static Atom action_atom = None, type_atom = None;
+		static gboolean atoms_init = FALSE;
+		XClientMessageEvent ev;
+		Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
+
+		if (!atoms_init) {
+			action_atom = XInternAtom (xdisplay, "_SLAB_ACTION_MAIN_MENU", FALSE);
+			type_atom = XInternAtom (xdisplay, "_SLAB_ACTION", FALSE);
+
+			atoms_init = TRUE;
+		}
+
+		ev.type = ClientMessage;
+		ev.window = RootWindow (xdisplay, DefaultScreen (xdisplay));
+		ev.message_type = type_atom;
+		ev.format = 32;
+		ev.data.l[0] = action_atom;
+		ev.data.l[1] = activate_time;
+
+		XUngrabKeyboard (xdisplay, activate_time);
+		XSendEvent (xdisplay, RootWindow (xdisplay, DefaultScreen (xdisplay)),
+			    True, StructureNotifyMask, (XEvent*) &ev);
+
+		g_free (path);
+
+		return;
+	}
+
 	panel_widget = panels->data;
 	menu = create_main_menu (panel_widget);