[mutter/gnome-41] x11-display: Init event mask after taking manager selection



commit 503d074746c76d967596e66f2232323fcfc6f4b3
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri May 27 10:51:24 2022 +0200

    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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2432>
    (cherry picked from commit 1e95710c5240f834d3ba643ec2c4091e576c8edb)

 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 a10e6f2feb..1e3426e84d 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -1274,8 +1274,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);
 
@@ -1389,6 +1387,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;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]