From 6d2a8da2232cf041a94a07a9672043225f91041d Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 8 Jan 2010 19:47:56 +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 c177235f..2d30157d 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1084,6 +1084,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); @@ -1101,9 +1104,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); -- 2.34.1