i3 - improved tiling WM


Fix centering the indicator in the no-xinerama case

Patch status: merged

Patch by Sebastian Ullrich

To apply this patch, use:
curl http://cr.i3wm.org/patch/120/raw.patch | git am

b/unlock_indicator.c

13
@@ -246,8 +246,8 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
14
         /* We have no information about the screen sizes/positions, so we just
15
          * place the unlock indicator in the middle of the X root window and
16
          * hope for the best. */
17
-        int x = (last_resolution[0] / 2);
18
-        int y = (last_resolution[1] / 2);
19
+        int x = (last_resolution[0] / 2) - (BUTTON_DIAMETER / 2);
20
+        int y = (last_resolution[1] / 2) - (BUTTON_DIAMETER / 2);
21
         cairo_set_source_surface(xcb_ctx, output, x, y);
22
         cairo_rectangle(xcb_ctx, x, y, BUTTON_DIAMETER, BUTTON_DIAMETER);
23
         cairo_fill(xcb_ctx);