aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-01-05 19:58:44 (GMT)
committermarkt <markt>2007-01-05 19:58:44 (GMT)
commitdbe528755ef388f5db01296eaf5dbabcb3c82ec7 (patch)
tree62fa4cda498248c86b0dad7319d6461f3547ea6d /src/Window.cc
parent416cca0eddb164d6c328588829f6c48d6e4e976d (diff)
downloadfluxbox-dbe528755ef388f5db01296eaf5dbabcb3c82ec7.zip
fluxbox-dbe528755ef388f5db01296eaf5dbabcb3c82ec7.tar.bz2
fix window menu placement with toolbar at top of screen, and disable titlebar when doing it
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 523fd66..d878e2e 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2333,8 +2333,10 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) {
2333 2333
2334 int head = screen().getHead(menu_x, menu_y); 2334 int head = screen().getHead(menu_x, menu_y);
2335 2335
2336 // but not under screen 2336 // but not off the screen
2337 if (menu_y + menu().height() >= screen().maxBottom(head)) 2337 if (menu_y < static_cast<signed>(screen().maxTop(head)))
2338 menu_y = screen().maxTop(head);
2339 else if (menu_y + menu().height() >= screen().maxBottom(head))
2338 menu_y = screen().maxBottom(head) - menu().height() - 1 - menu().fbwindow().borderWidth(); 2340 menu_y = screen().maxBottom(head) - menu().height() - 1 - menu().fbwindow().borderWidth();
2339 2341
2340 if (menu_x < static_cast<signed>(screen().maxLeft(head))) 2342 if (menu_x < static_cast<signed>(screen().maxLeft(head)))