]> Dogcows Code - chaz/openbox/commitdiff
snapping better to the xinerama regions
authorDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 21:09:30 +0000 (21:09 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 21:09:30 +0000 (21:09 +0000)
src/Window.cc

index 226ac023f4f51dbca598e63b30ab7b03f9026e07..bd2f0c068862e04559943508675290599059cce9 100644 (file)
@@ -1810,7 +1810,7 @@ void BlackboxWindow::maximize(unsigned int button) {
 
     frame.changing = *it;
   } else
-#endif
+#endif // XINERAMA
   frame.changing = screen->availableArea();
 
   switch(button) {
@@ -3044,17 +3044,25 @@ void BlackboxWindow::doMove(int x_root, int y_root) {
 
     // snap to the strut (and screen boundaries for xinerama)
 #ifdef    XINERAMA
-    if (screen->isXineramaActive() && blackbox->doXineramaSnapping())
+    if (screen->isXineramaActive() && blackbox->doXineramaSnapping()) {
+      if (! screen->doFullMax())
+        snaplist.insert(snaplist.begin(),
+                        screen->allAvailableAreas().begin(),
+                        screen->allAvailableAreas().end());
+
+      // always snap to the screen edges
       snaplist.insert(snaplist.begin(),
-                      screen->allAvailableAreas().begin(),
-                      screen->allAvailableAreas().end());
-    else
+                      screen->getXineramaAreas().begin(),
+                      screen->getXineramaAreas().end());
+    else
 #endif // XINERAMA
+    {
       if (! screen->doFullMax())
         snaplist.push_back(screen->availableArea());
-    
-    // always snap to the screen edges
-    snaplist.push_back(screen->getRect());
+
+      // always snap to the screen edges
+      snaplist.push_back(screen->getRect());
+    }
 
     RectList::const_iterator it, end = snaplist.end();
     for (it = snaplist.begin(); it != end; ++it) {
This page took 0.033181 seconds and 4 git commands to generate.