X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=855828c6303b84227f4a31c230fee0cfb879a610;hb=6c5f6ed1f5d501c79977a55c0f2430ebdd32ef6c;hp=c41110184429ef9a02735a8c85b15dac81c6f28f;hpb=780d1b0961e2eed5fea4645b4398fafb4adad73a;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index c4111018..855828c6 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -407,7 +407,7 @@ static gboolean menu_hide_delay_func(gpointer data) return FALSE; /* no repeat */ } -void menu_show(gchar *name, gint x, gint y, gint button, ObClient *client) +void menu_show(gchar *name, gint x, gint y, gboolean mouse, ObClient *client) { ObMenu *self; ObMenuFrame *frame; @@ -429,10 +429,10 @@ void menu_show(gchar *name, gint x, gint y, gint button, ObClient *client) menu_clear_pipe_caches(); frame = menu_frame_new(self, 0, client); - if (!menu_frame_show_topmenu(frame, x, y, button)) + if (!menu_frame_show_topmenu(frame, x, y, mouse)) menu_frame_free(frame); else { - if (!button) { + if (!mouse) { /* select the first entry if it's not a submenu and we opened * the menu with the keyboard, and skip all headers */ GList *it = frame->entries; @@ -449,7 +449,7 @@ void menu_show(gchar *name, gint x, gint y, gint button, ObClient *client) } /* reset the hide timer */ - if (!button) + if (!mouse) menu_can_hide = TRUE; else { menu_can_hide = FALSE;