diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-10-11 06:47:11 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-10-11 06:47:11 +0000 |
| commit | b49b7c415c5b61910e7c2c28831c047f0e479ac5 (patch) | |
| tree | 8e6a78c817e05886690f577280cf30eeda16f68e /openbox/menuframe.c | |
| parent | 4b0e4af80aaec5fed9ad0a369cd570fb3dee4cda (diff) | |
free menuframes when they fail to show themselves
Diffstat (limited to 'openbox/menuframe.c')
| -rw-r--r-- | openbox/menuframe.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 09fce051..fcdb47f5 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -584,20 +584,20 @@ static void menu_frame_update(ObMenuFrame *self) menu_frame_render(self); } -void menu_frame_show(ObMenuFrame *self, ObMenuFrame *parent) +gboolean menu_frame_show(ObMenuFrame *self, ObMenuFrame *parent) { GList *it; if (g_list_find(menu_frame_visible, self)) - return; + return TRUE; if (menu_frame_visible == NULL) { /* no menus shown yet */ if (!grab_pointer(TRUE, OB_CURSOR_NONE)) - return; + return FALSE; if (!grab_keyboard(TRUE)) { grab_pointer(FALSE, OB_CURSOR_NONE); - return; + return FALSE; } } @@ -626,6 +626,8 @@ void menu_frame_show(ObMenuFrame *self, ObMenuFrame *parent) menu_frame_move_on_screen(self); XMapWindow(ob_display, self->window); + + return TRUE; } void menu_frame_hide(ObMenuFrame *self) |
