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.
This commit is contained in:
Nikos Tsipinakis 2019-03-23 19:00:19 +02:00
parent 812d5a3b84
commit 1bc3237a35

View File

@ -674,9 +674,17 @@ struct window_x11 *x_win_create(void)
win->esrc = x_win_reg_source(win); 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) { if (settings.f_mode != FOLLOW_NONE) {
root_event_mask |= FocusChangeMask | PropertyChangeMask; root_event_mask |= FocusChangeMask;
} }
XSelectInput(xctx.dpy, root, root_event_mask); XSelectInput(xctx.dpy, root, root_event_mask);