Commit b89e4daa authored by Jacob Berkman's avatar Jacob Berkman Committed by Jacob Berkman

only make the menu, don't pop it up (panel_event): popup menu here

1999-12-13  Jacob Berkman  <jberkman@andrew.cmu.edu>

* panel.c (make_popup_panel_menu): only make the menu, don't pop
it up
(panel_event): popup menu here

* global-keys.c (panel_global_keys_filter): popup menu here
parent c1965bfc
1999-12-13 Jacob Berkman <jberkman@andrew.cmu.edu>
* panel.c (make_popup_panel_menu): only make the menu, don't pop
it up
(panel_event): popup menu here
* global-keys.c (panel_global_keys_filter): popup menu here
* session.c (apply_global_config): (re)init keystuff here
(load_up_globals): load up keystuff config
......
1999-12-13 Jacob Berkman <jberkman@andrew.cmu.edu>
* panel.c (make_popup_panel_menu): only make the menu, don't pop
it up
(panel_event): popup menu here
* global-keys.c (panel_global_keys_filter): popup menu here
* session.c (apply_global_config): (re)init keystuff here
(load_up_globals): load up keystuff config
......
......@@ -77,8 +77,12 @@ panel_global_keys_filter(GdkXEvent *gdk_xevent, GdkEvent *event)
case KeyRelease:
if(kev->keycode == global_config.menu_keycode) {
winkey_depth--;
if(!num_subkeys)
popup_panel_menu (GDK_CURRENT_TIME);
if(!num_subkeys) {
GtkWidget *menu =
make_popup_panel_menu ();
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
NULL, NULL, 0, GDK_CURRENT_TIME);
}
return GDK_FILTER_REMOVE;
}
break;
......
......@@ -619,8 +619,8 @@ panel_menu_get(PanelData *pd)
return pd->menu;
}
void
popup_panel_menu (long time)
GtkWidget *
make_popup_panel_menu ()
{
BasePWidget *basep;
PanelData *pd;
......@@ -643,9 +643,7 @@ popup_panel_menu (long time)
}
pd->menu_age = 0;
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
NULL, NULL, 0, time);
return menu;
}
static int
......@@ -659,9 +657,15 @@ panel_event(GtkWidget *widget, GdkEvent *event, PanelData *pd)
switch(bevent->button) {
case 3: /* fall through */
if(!panel_applet_in_drag) {
GtkWidget *menu;
current_panel =
PANEL_WIDGET(basep->panel);
popup_panel_menu (bevent->time);
menu = make_popup_panel_menu ();
gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
global_config.off_panel_popups
? panel_menu_position : NULL,
widget, bevent->button,
bevent->time);
return TRUE;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment