X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=ac033f4b44756a4432741fde0046fbd3561fa0bd;hb=aa5394cad2dc0bac46631e29005cbc7b99d03330;hp=4ee5d31e436cbc0e665838bb0add670760a908fe;hpb=6014a41760a107d817422aa5412ccf0ce3fc6e92;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 4ee5d31e..ac033f4b 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -27,6 +27,7 @@ #include "openbox.h" #include "config.h" #include "obt/prop.h" +#include "obt/keyboard.h" #include "obrender/theme.h" #define PADDING 2 @@ -154,6 +155,13 @@ void menu_frame_free(ObMenuFrame *self) } } +ObtIC* menu_frame_ic(ObMenuFrame *self) +{ + /* menus are always used through a grab right now, so they can always use + the grab input context */ + return grab_input_context(); +} + static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry, ObMenuFrame *frame) { @@ -1262,9 +1270,10 @@ void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state) GSList *acts = self->entry->data.normal.actions; ObClient *client = self->frame->client; ObMenuFrame *frame = self->frame; + guint mods = obt_keyboard_only_modmasks(state); /* release grabs before executing the shit */ - if (!(state & ControlMask)) { + if (!(mods & ControlMask)) { event_cancel_all_key_grabs(); frame = NULL; }