summaryrefslogtreecommitdiff
path: root/i3lock.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2012-05-19 21:13:03 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-05-19 21:13:03 +0200
commit9b29ae7afd3f3827c107fb441ebcbbf73a1c1ced (patch)
treee47263d8250a403b9212931866d085c601842873 /i3lock.c
parentf9416f6bc66c9d950d0f74a34b093a48a94d3104 (diff)
Bugfix: Correctly center unlock indicator after reconfiguring screens (Thanks xn)
Fixes: #712
Diffstat (limited to 'i3lock.c')
-rw-r--r--i3lock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/i3lock.c b/i3lock.c
index 9c55db2..7a2812d 100644
--- a/i3lock.c
+++ b/i3lock.c
@@ -431,6 +431,9 @@ void handle_screen_resize(void) {
uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
xcb_configure_window(conn, win, mask, last_resolution);
xcb_flush(conn);
+
+ xinerama_query_screens();
+ redraw_screen();
}
/*
@@ -683,6 +686,8 @@ int main(int argc, char *argv[]) {
last_resolution[0] = screen->width_in_pixels;
last_resolution[1] = screen->height_in_pixels;
+ xcb_change_window_attributes(conn, screen->root, XCB_CW_EVENT_MASK,
+ (uint32_t[]){ XCB_EVENT_MASK_STRUCTURE_NOTIFY });
#ifndef NOLIBCAIRO
if (image_path) {