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:
parent
9616a676d8
commit
6febc40c47
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue