From: Mikael Magnusson Date: Sun, 8 Feb 2009 16:35:26 +0000 (+0100) Subject: Only warp on menu close if it was also the top level menu. X-Git-Tag: mikabox-3.4.7.2~17 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=47606391767e557c56ed8bad5845c2ded88b8241;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 73364a89..3a2e2f1b 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1052,6 +1052,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) self->parent->child = NULL; self->parent = NULL; @@ -1065,9 +1068,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); - XUnmapWindow(obt_display, self->window); menu_frame_free(self);