fix window menu placement with toolbar at top of screen, and disable titlebar when doing it
This commit is contained in:
parent
416cca0edd
commit
dbe528755e
3 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,9 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 1.0rc3:
|
Changes for 1.0rc3:
|
||||||
*07/01/05:
|
*07/01/05:
|
||||||
|
* Fix placement of window menu with toolbar at the top of the screen,
|
||||||
|
and remove titlebar from window menu (Mark)
|
||||||
|
Window.cc IconButton.cc
|
||||||
* Don't change focus to a window that doesn't accept focus (Mark)
|
* Don't change focus to a window that doesn't accept focus (Mark)
|
||||||
FocusControl.cc
|
FocusControl.cc
|
||||||
* Only grab keybindings on screens managed by fluxbox (Mark)
|
* Only grab keybindings on screens managed by fluxbox (Mark)
|
||||||
|
|
|
@ -57,7 +57,6 @@ public:
|
||||||
explicit ShowMenu(FluxboxWindow &win):m_win(win) { }
|
explicit ShowMenu(FluxboxWindow &win):m_win(win) { }
|
||||||
void execute() {
|
void execute() {
|
||||||
m_win.screen().hideMenus();
|
m_win.screen().hideMenus();
|
||||||
m_win.menu().enableTitle();
|
|
||||||
// get last button pos
|
// get last button pos
|
||||||
const XEvent &event = Fluxbox::instance()->lastEvent();
|
const XEvent &event = Fluxbox::instance()->lastEvent();
|
||||||
int x = event.xbutton.x_root - (m_win.menu().width() / 2);
|
int x = event.xbutton.x_root - (m_win.menu().width() / 2);
|
||||||
|
|
|
@ -2333,8 +2333,10 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) {
|
||||||
|
|
||||||
int head = screen().getHead(menu_x, menu_y);
|
int head = screen().getHead(menu_x, menu_y);
|
||||||
|
|
||||||
// but not under screen
|
// but not off the screen
|
||||||
if (menu_y + menu().height() >= screen().maxBottom(head))
|
if (menu_y < static_cast<signed>(screen().maxTop(head)))
|
||||||
|
menu_y = screen().maxTop(head);
|
||||||
|
else if (menu_y + menu().height() >= screen().maxBottom(head))
|
||||||
menu_y = screen().maxBottom(head) - menu().height() - 1 - menu().fbwindow().borderWidth();
|
menu_y = screen().maxBottom(head) - menu().height() - 1 - menu().fbwindow().borderWidth();
|
||||||
|
|
||||||
if (menu_x < static_cast<signed>(screen().maxLeft(head)))
|
if (menu_x < static_cast<signed>(screen().maxLeft(head)))
|
||||||
|
|
Loading…
Reference in a new issue