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.
This commit is contained in:
Mathias Gumz 2011-02-24 00:26:32 +01:00
parent 9616a676d8
commit 6febc40c47

View file

@ -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<signed>(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();
}