]> Dogcows Code - chaz/openbox/commitdiff
make fake xinerama happen even when xinerama is enabled
authorDana Jansens <danakj@orodu.net>
Sat, 12 Jan 2008 00:30:29 +0000 (19:30 -0500)
committerDana Jansens <danakj@orodu.net>
Sat, 12 Jan 2008 00:30:29 +0000 (19:30 -0500)
openbox/extensions.c

index ee73e9ece512dfc6d964f411c119aacdd1c2c061..d1088361452a2bbdcdfc077fcd36a2dac86c965a 100644 (file)
@@ -86,6 +86,16 @@ void extensions_xinerama_screens(Rect **xin_areas, guint *nxin)
 {
     guint i;
     gint l, r, t, b;
+    if (ob_debug_xinerama) {
+        g_print("Using fake xinerama !\n");
+        gint w = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen));
+        gint h = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen));
+        *nxin = 2;
+        *xin_areas = g_new(Rect, *nxin + 1);
+        RECT_SET((*xin_areas)[0], 0, 0, w/2, h);
+        RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h);
+    }
+    else
 #ifdef XINERAMA
     if (extensions_xinerama) {
         guint i;
@@ -97,17 +107,10 @@ void extensions_xinerama_screens(Rect **xin_areas, guint *nxin)
             RECT_SET((*xin_areas)[i], info[i].x_org, info[i].y_org,
                      info[i].width, info[i].height);
         XFree(info);
-    } else
-#endif
-    if (ob_debug_xinerama) {
-        gint w = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen));
-        gint h = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen));
-        *nxin = 2;
-        *xin_areas = g_new(Rect, *nxin + 1);
-        RECT_SET((*xin_areas)[0], 0, 0, w/2, h);
-        RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h);
     }
-    else {
+    else
+#endif
+    {
         *nxin = 1;
         *xin_areas = g_new(Rect, *nxin + 1);
         RECT_SET((*xin_areas)[0], 0, 0,
This page took 0.026067 seconds and 4 git commands to generate.