snap a window menu to the bottom of the screen if it is positioned too low.

This commit is contained in:
Scott Moynes 2002-10-01 01:17:24 +00:00
parent 5b8ec88623
commit 783fac59c9

View file

@ -3180,6 +3180,12 @@ void BlackboxWindow::buttonPressEvent(const XButtonEvent *be) {
else if (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->show();
XRaiseWindow(blackbox->getXDisplay(), windowmenu->getWindowID());