From 1e95710c5240f834d3ba643ec2c4091e576c8edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 27 May 2022 10:51:24 +0200 Subject: [PATCH] x11-display: Init event mask after taking manager selection Initializing the event mask, SubstructureRedirectMask in particular, before taking the manager selection fails with BadAccess. Fix this by initializing said mask after taking the manager selection. This fixes `--replace`. Fixes: eb4307c3501f347a701d376a591adaab17ba3986 Part-of: --- src/x11/meta-x11-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index f4f313fa9..9a2f02e9e 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -1303,8 +1303,6 @@ meta_x11_display_new (MetaDisplay *display, GError **error) xroot, PropertyChangeMask); - init_event_masks (x11_display); - /* Select for cursor changes so the cursor tracker is up to date. */ XFixesSelectCursorInput (xdisplay, xroot, XFixesDisplayCursorNotifyMask); @@ -1418,6 +1416,8 @@ meta_x11_display_new (MetaDisplay *display, GError **error) x11_display->wm_sn_atom = wm_sn_atom; x11_display->wm_sn_timestamp = timestamp; + init_event_masks (x11_display); + return x11_display; }