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>