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

@ -3179,7 +3179,13 @@ void BlackboxWindow::buttonPressEvent(const XButtonEvent *be) {
my = top_edge; my = top_edge;
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());