diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-03 20:39:26 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-03 20:39:26 +0000 |
| commit | e0e1d4ba7e150b215b55029ddbff3c824b94caf7 (patch) | |
| tree | f77339bd42489362112e75ddee8855231c12e6ad /openbox/menuframe.c | |
| parent | 53975abf1220c36ebbab455299a9915477c5a6b8 (diff) | |
don't show the client menu when its for an invalid window
Diffstat (limited to 'openbox/menuframe.c')
| -rw-r--r-- | openbox/menuframe.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6f8ecad0..a95e46fc 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -751,16 +751,6 @@ static gboolean menu_frame_show(ObMenuFrame *self) { GList *it; - if (menu_frame_visible == NULL) { - /* no menus shown yet */ - if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER)) - return FALSE; - if (!grab_keyboard(TRUE)) { - grab_pointer(FALSE, TRUE, OB_CURSOR_POINTER); - return FALSE; - } - } - /* determine if the underlying menu is already visible */ for (it = menu_frame_visible; it; it = g_list_next(it)) { ObMenuFrame *f = it->data; @@ -769,7 +759,18 @@ static gboolean menu_frame_show(ObMenuFrame *self) } if (!it) { if (self->menu->update_func) - self->menu->update_func(self, self->menu->data); + if (!self->menu->update_func(self, self->menu->data)) + return FALSE; + } + + if (menu_frame_visible == NULL) { + /* no menus shown yet */ + if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER)) + return FALSE; + if (!grab_keyboard(TRUE)) { + grab_pointer(FALSE, TRUE, OB_CURSOR_POINTER); + return FALSE; + } } menu_frame_update(self); |
