diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-01 01:17:24 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-01 01:17:24 +0000 |
| commit | 783fac59c994930139c1ee8162b9150e41dc8307 (patch) | |
| tree | 3a27f19ee6b91dd488dc2c1d9e3bb24a79200fdc /src/Window.cc | |
| parent | 5b8ec886237aff9ede99feb66721f8ac7a44d2ed (diff) | |
snap a window menu to the bottom of the screen if it is positioned too low.
Diffstat (limited to 'src/Window.cc')
| -rw-r--r-- | src/Window.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index c5d3db39..3a982115 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3179,7 +3179,13 @@ void BlackboxWindow::buttonPressEvent(const XButtonEvent *be) { my = top_edge; 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()); |
