From 47606391767e557c56ed8bad5845c2ded88b8241 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 8 Feb 2009 17:35:26 +0100 Subject: [PATCH] Only warp on menu close if it was also the top level menu. --- openbox/menuframe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.34.1