From 1bc3237a359f37905426012c0cca90d71c4b3b18 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Sat, 23 Mar 2019 19:00:19 +0200 Subject: [PATCH] Subscribe to PropertyChangeMask regardless of follow_mode PropertyNotify events are used primarily to detect active screen changes when follow mode is used but now we also need them to receive resource manager events in order to update the dpi value. --- src/x11/x.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/x11/x.c b/src/x11/x.c index 8540b51..55267e8 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -674,9 +674,17 @@ struct window_x11 *x_win_create(void) win->esrc = x_win_reg_source(win); - long root_event_mask = SubstructureNotifyMask; + /* SubstructureNotifyMask is required for receiving CreateNotify events + * in order to raise the window when something covers us. See #160 + * + * PropertyChangeMask is requred for getting screen change events when follow_mode != none + * and it's also needed to receive + * XA_RESOURCE_MANAGER events to update the dpi when + * the xresource value is updated + */ + long root_event_mask = SubstructureNotifyMask | PropertyChangeMask; if (settings.f_mode != FOLLOW_NONE) { - root_event_mask |= FocusChangeMask | PropertyChangeMask; + root_event_mask |= FocusChangeMask; } XSelectInput(xctx.dpy, root, root_event_mask);