aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-23 23:26:32 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-23 23:26:32 (GMT)
commit6febc40c47f8acc2c5afb78990d794303ab61b14 (patch)
tree986cee106470326b124c4b4423ef32bb37ebe3a8 /src
parent9616a676d869b8f67742da99d55e9327ea867166 (diff)
downloadfluxbox_paul-6febc40c47f8acc2c5afb78990d794303ab61b14.zip
fluxbox_paul-6febc40c47f8acc2c5afb78990d794303ab61b14.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc3
1 files changed, 2 insertions, 1 deletions
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) {
1887 1887
1888 int head = screen().getHead(menu_x, menu_y); 1888 int head = screen().getHead(menu_x, menu_y);
1889 1889
1890 menu().updateMenu(); // recalculate the menu size
1891
1890 // move menu directly under titlebar but not off the screen 1892 // move menu directly under titlebar but not off the screen
1891 if (menu_y < static_cast<signed>(screen().maxTop(head))) 1893 if (menu_y < static_cast<signed>(screen().maxTop(head)))
1892 menu_y = screen().maxTop(head); 1894 menu_y = screen().maxTop(head);
@@ -1901,7 +1903,6 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) {
1901 FbMenu::setWindow(this); 1903 FbMenu::setWindow(this);
1902 menu().move(menu_x, menu_y); 1904 menu().move(menu_x, menu_y);
1903 menu().show(); 1905 menu().show();
1904 menu().raise();
1905 menu().grabInputFocus(); 1906 menu().grabInputFocus();
1906} 1907}
1907 1908