diff options
author | markt <markt> | 2007-01-05 19:58:44 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-05 19:58:44 (GMT) |
commit | dbe528755ef388f5db01296eaf5dbabcb3c82ec7 (patch) | |
tree | 62fa4cda498248c86b0dad7319d6461f3547ea6d | |
parent | 416cca0eddb164d6c328588829f6c48d6e4e976d (diff) | |
download | fluxbox-dbe528755ef388f5db01296eaf5dbabcb3c82ec7.zip fluxbox-dbe528755ef388f5db01296eaf5dbabcb3c82ec7.tar.bz2 |
fix window menu placement with toolbar at top of screen, and disable titlebar when doing it
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/IconButton.cc | 1 | ||||
-rw-r--r-- | src/Window.cc | 6 |
3 files changed, 7 insertions, 3 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes for 1.0rc3: |
3 | *07/01/05: | 3 | *07/01/05: |
4 | * Fix placement of window menu with toolbar at the top of the screen, | ||
5 | and remove titlebar from window menu (Mark) | ||
6 | Window.cc IconButton.cc | ||
4 | * Don't change focus to a window that doesn't accept focus (Mark) | 7 | * Don't change focus to a window that doesn't accept focus (Mark) |
5 | FocusControl.cc | 8 | FocusControl.cc |
6 | * Only grab keybindings on screens managed by fluxbox (Mark) | 9 | * Only grab keybindings on screens managed by fluxbox (Mark) |
diff --git a/src/IconButton.cc b/src/IconButton.cc index b9cf523..aaff5b8 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -57,7 +57,6 @@ public: | |||
57 | explicit ShowMenu(FluxboxWindow &win):m_win(win) { } | 57 | explicit ShowMenu(FluxboxWindow &win):m_win(win) { } |
58 | void execute() { | 58 | void execute() { |
59 | m_win.screen().hideMenus(); | 59 | m_win.screen().hideMenus(); |
60 | m_win.menu().enableTitle(); | ||
61 | // get last button pos | 60 | // get last button pos |
62 | const XEvent &event = Fluxbox::instance()->lastEvent(); | 61 | const XEvent &event = Fluxbox::instance()->lastEvent(); |
63 | int x = event.xbutton.x_root - (m_win.menu().width() / 2); | 62 | int x = event.xbutton.x_root - (m_win.menu().width() / 2); |
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))) |