]> Dogcows Code - chaz/openbox/commitdiff
snap a window menu to the bottom of the screen if it is positioned too low.
authorScott Moynes <smoynes@nexus.carleton.ca>
Tue, 1 Oct 2002 01:17:24 +0000 (01:17 +0000)
committerScott Moynes <smoynes@nexus.carleton.ca>
Tue, 1 Oct 2002 01:17:24 +0000 (01:17 +0000)
src/Window.cc

index c5d3db39e0da8c48e93ac2017dfbf50bdecad542..3a9821157ea585643672cd379cfd3beb729c469f 100644 (file)
@@ -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());
This page took 0.024286 seconds and 4 git commands to generate.