From 6febc40c47f8acc2c5afb78990d794303ab61b14 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Thu, 24 Feb 2011 00:26:32 +0100 Subject: bugfix: place WindowMenu correctly upon first call (closes #2731524) FbTk::Menu::updateMenu() recalculates the width() and height() of the window. this must be done before the menu is moved to fit completely onto the screen. the 'menu().raise()' command is not needed, that is done inside 'menu().show()' already. --- src/Window.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Window.cc b/src/Window.cc index 79e9b43..c87180d 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1887,6 +1887,8 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) { int head = screen().getHead(menu_x, menu_y); + menu().updateMenu(); // recalculate the menu size + // move menu directly under titlebar but not off the screen if (menu_y < static_cast(screen().maxTop(head))) menu_y = screen().maxTop(head); @@ -1901,7 +1903,6 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) { FbMenu::setWindow(this); menu().move(menu_x, menu_y); menu().show(); - menu().raise(); menu().grabInputFocus(); } -- cgit v0.11.2