snap a window menu to the bottom of the screen if it is positioned too low.
This commit is contained in:
parent
5b8ec88623
commit
783fac59c9
1 changed files with 6 additions and 0 deletions
|
@ -3180,6 +3180,12 @@ void BlackboxWindow::buttonPressEvent(const XButtonEvent *be) {
|
||||||
else if (my > bottom_edge)
|
else if (my > bottom_edge)
|
||||||
my = bottom_edge;
|
my = bottom_edge;
|
||||||
|
|
||||||
|
if (my + windowmenu->getHeight() > screen->getHeight())
|
||||||
|
my = screen->getHeight() - windowmenu->getHeight() -
|
||||||
|
(screen->getBorderWidth() * 2);
|
||||||
|
|
||||||
|
|
||||||
|
cout << my << endl;
|
||||||
windowmenu->move(mx, my);
|
windowmenu->move(mx, my);
|
||||||
windowmenu->show();
|
windowmenu->show();
|
||||||
XRaiseWindow(blackbox->getXDisplay(), windowmenu->getWindowID());
|
XRaiseWindow(blackbox->getXDisplay(), windowmenu->getWindowID());
|
||||||
|
|
Loading…
Reference in a new issue