From: Mikael Magnusson Date: Fri, 8 Jan 2010 18:47:56 +0000 (+0100) Subject: Only warp on menu close if it was also the top level menu. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=ce1cfeb001d815c16d37b6d7766a5c01fd7fd9a1;p=mikachu%2Fopenbox.git Only warp on menu close if it was also the top level menu. --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index fab2696f..30730d97 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1112,6 +1112,9 @@ static void menu_frame_hide(ObMenuFrame *self) if (self->child) menu_frame_hide(self->child); + if (!self->parent && self->menu->warp) + XWarpPointer(obt_display, None, obt_root(ob_screen), 0, 0, 0, 0, self->ox, self->oy); + if (self->parent) { remove_submenu_hide_timeout(self); @@ -1129,9 +1132,6 @@ static void menu_frame_hide(ObMenuFrame *self) ungrab_keyboard(); } - if (self->menu->warp) - XWarpPointer(obt_display, None, obt_root(ob_screen), 0, 0, 0, 0, self->ox, self->oy); - ignore_start = event_start_ignore_all_enters(); XUnmapWindow(obt_display, self->window); event_end_ignore_all_enters(ignore_start);