]> Dogcows Code - chaz/openbox/commitdiff
set workarea correctly
authorDana Jansens <danakj@orodu.net>
Wed, 13 Jun 2007 08:58:13 +0000 (08:58 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 13 Jun 2007 08:58:13 +0000 (08:58 +0000)
openbox/screen.c

index 613f774f71d03e2b2cafd8c6e8710d75f814d12a..9f92efc8eacb88e67deebe2b1bcb6f772f68fda8 100644 (file)
@@ -1126,10 +1126,10 @@ void screen_update_areas()
     /* set up the work areas to be full screen */
     for (i = 0; i < screen_num_monitors; ++i)
         for (j = 0; j < screen_num_desktops; ++j) {
-            dims[i * j + 0] = monitor_area[i].x;
-            dims[i * j + 1] = monitor_area[i].y;
-            dims[i * j + 2] = monitor_area[i].width;
-            dims[i * j + 3] = monitor_area[i].height;
+            dims[(i * screen_num_desktops + j) * 4+0] = monitor_area[i].x;
+            dims[(i * screen_num_desktops + j) * 4+1] = monitor_area[i].y;
+            dims[(i * screen_num_desktops + j) * 4+2] = monitor_area[i].width;
+            dims[(i * screen_num_desktops + j) * 4+3] = monitor_area[i].height;
         }
 
     /* calculate the work areas from the struts */
@@ -1170,10 +1170,10 @@ void screen_update_areas()
 
             /* based on these margins, set the work area for the
                monitor/desktop */
-            dims[i * j + 0] += l;
-            dims[i * j + 1] += t;
-            dims[i * j + 2] -= l + r;
-            dims[i * j + 3] -= t + b;
+            dims[(i * screen_num_desktops + j) * 4 + 0] += l;
+            dims[(i * screen_num_desktops + j) * 4 + 1] += t;
+            dims[(i * screen_num_desktops + j) * 4 + 2] -= l + r;
+            dims[(i * screen_num_desktops + j) * 4 + 3] -= t + b;
         }
 
     PROP_SETA32(RootWindow(ob_display, ob_screen), net_workarea, cardinal,
This page took 0.029311 seconds and 4 git commands to generate.