mirror of
https://github.com/Raymo111/i3lock-color.git
synced 2025-02-17 15:55:52 -05:00
Fix centering the indicator in the no-xinerama case
This commit is contained in:
parent
d4d589a7dd
commit
e0213cb1f5
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue