]> Dogcows Code - chaz/openbox/commitdiff
get the right rects for the xinerama regions
authorDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 02:07:36 +0000 (02:07 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 02:07:36 +0000 (02:07 +0000)
src/BaseDisplay.cc
src/Screen.cc

index 320f2ba11d3b5e18f15f7a23623619210b4ead12..5aecac891772c891e1609d394c907c9b27f3adb9 100644 (file)
@@ -493,20 +493,22 @@ ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) {
          on a pre-screen basis anyways.
       */
       xinerama_active = XineramaIsActive(d->getXDisplay());
-      /*
-         If Xinerama is being used, there there is only going to be one screen
-         present. We still, of course, want to use the screen class, but that is
-         why no screen number is used in this function call. There should never
-         be more than one screen present with Xinerama active.
-      */
-      int num;
-      XineramaScreenInfo *info = XineramaQueryScreens(d->getXDisplay(), &num);
-      if (num > 0 && info) {
-        for (int i = 0; i < num; ++i) {
-          xinerama_areas.push_back(Rect(info[i].x_org, info[i].y_org,
-                                        info[i].width, info[i].height));
+      if (xinerama_active) {
+        /*
+           If Xinerama is being used, there there is only going to be one screen
+           present. We still, of course, want to use the screen class, but that
+           is why no screen number is used in this function call. There should
+           never be more than one screen present with Xinerama active.
+        */
+        int num;
+        XineramaScreenInfo *info = XineramaQueryScreens(d->getXDisplay(), &num);
+        if (num > 0 && info) {
+          for (int i = 0; i < num; ++i) {
+            xinerama_areas.push_back(Rect(info[i].x_org, info[i].y_org,
+                                          info[i].width, info[i].height));
+          }
+          XFree(info);
         }
-        XFree(info);
       }
     }
   }
index 92dd4a7074f89b7d12386f8c5328460e6d0ce12f..60cd8e09bfee6f7ab9fad63b9c981cfbb32eeace 100644 (file)
@@ -2093,7 +2093,7 @@ void BScreen::updateAvailableArea(void) {
 #ifdef    XINERAMA
   // reset to the full areas
   if (isXineramaActive())
-    xineramaUsableArea = allAvailableAreas();
+    xineramaUsableArea = getXineramaAreas();
 #endif // XINERAMA
 
   /* these values represent offsets from the screen edge
This page took 0.029477 seconds and 4 git commands to generate.