From: Dana Jansens Date: Sat, 30 Aug 2003 05:04:08 +0000 (+0000) Subject: fix grabbing and not releasing with menus X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=3ff8eb037e9a0ea5d4c8ffd65831eb01a00f1de7;p=chaz%2Fopenbox fix grabbing and not releasing with menus --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 34c7fd85..bfa2b4be 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -488,14 +488,14 @@ void menu_frame_hide(ObMenuFrame *self) self->parent->child = NULL; self->parent = NULL; + menu_frame_visible = g_list_delete_link(menu_frame_visible, it); + if (menu_frame_visible == NULL) { /* last menu shown */ grab_pointer(FALSE, None); grab_keyboard(FALSE); } - menu_frame_visible = g_list_delete_link(menu_frame_visible, it); - XUnmapWindow(ob_display, self->window); menu_frame_free(self); @@ -623,7 +623,18 @@ void menu_entry_frame_execute(ObMenuEntryFrame *self, gboolean hide) { ObAction *act = it->data; act->data.any.c = client; - act->func(&act->data); + + if (act->func == action_moveresize) + screen_pointer_pos(&act->data.moveresize.x, + &act->data.moveresize.y); + + if (!(act->func == action_cycle_windows || + act->func == action_desktop_dir || + act->func == action_send_to_desktop_dir || + act->func == action_showmenu)) + { + act->func(&act->data); + } } } }