summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dørum <martid0311@gmail.com>2019-06-28 12:52:24 +0200
committerDrew DeVault <sir@cmpwn.com>2019-06-28 10:27:34 -0400
commit25ce4b12bb21b6fc2d1669861206d7c0d07bd330 (patch)
treefcd2582da11c2a9a5438d900b7bac652011c9131
parent11560381bf54d228aa09aa61bd31135ae0ea9662 (diff)
fix indicator position
-rw-r--r--render.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/render.c b/render.c
index b7eed2e..34134f0 100644
--- a/render.c
+++ b/render.c
@@ -80,9 +80,10 @@ void render_frame(struct swaylock_surface *surface) {
int new_width = buffer_diameter;
int new_height = buffer_diameter;
- int subsurf_xpos = surface->width / 2 - buffer_width / 2;
+ int subsurf_xpos = surface->width / 2 -
+ (state->args.radius + state->args.thickness) + 2 / surface->scale;
int subsurf_ypos = surface->height / 2 -
- (state->args.radius + state->args.thickness);
+ (state->args.radius + state->args.thickness) + 2 / surface->scale;
wl_subsurface_set_position(surface->subsurface, subsurf_xpos, subsurf_ypos);
surface->current_buffer = get_next_buffer(state->shm,