File gnome-panel-alt-f1-slab.patch of Package gnome-panel.import4835
Index: gnome-panel/panel-action-protocol.c
===================================================================
--- gnome-panel/panel-action-protocol.c.orig 2009-07-22 03:23:44.000000000 +1000
+++ gnome-panel/panel-action-protocol.c 2010-01-14 11:31:24.000000000 +1100
@@ -52,6 +52,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) {
@@ -67,6 +68,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);