summaryrefslogtreecommitdiff
path: root/unlock_indicator.c
diff options
context:
space:
mode:
authorSebastian Ullrich <sebasti@nullri.ch>2013-03-29 00:46:22 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-29 10:14:01 +0100
commite0213cb1f5be55e101406c2dec67ec2dc178c78c (patch)
treeda3ff62f7c4ef8e814292f0b7545800c98738334 /unlock_indicator.c
parentd4d589a7dd25a264c2679987fdb4072d833cb259 (diff)
Fix centering the indicator in the no-xinerama case
Diffstat (limited to 'unlock_indicator.c')
-rw-r--r--unlock_indicator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unlock_indicator.c b/unlock_indicator.c
index ab4d56e..5e4015c 100644
--- a/unlock_indicator.c
+++ b/unlock_indicator.c
@@ -246,8 +246,8 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
/* We have no information about the screen sizes/positions, so we just
* place the unlock indicator in the middle of the X root window and
* hope for the best. */
- int x = (last_resolution[0] / 2);
- int y = (last_resolution[1] / 2);
+ int x = (last_resolution[0] / 2) - (BUTTON_DIAMETER / 2);
+ int y = (last_resolution[1] / 2) - (BUTTON_DIAMETER / 2);
cairo_set_source_surface(xcb_ctx, output, x, y);
cairo_rectangle(xcb_ctx, x, y, BUTTON_DIAMETER, BUTTON_DIAMETER);
cairo_fill(xcb_ctx);