+ /* Like MacOS, locking under Wayland's embedded X11 server does not work.
+ (X11 grabs don't work because the Wayland window manager lives at a
+ higher level than the X11 emulation layer.)
+ */
+ if (!si->locking_disabled_p && getenv ("WAYLAND_DISPLAY"))
+ {
+ si->locking_disabled_p = True;
+ si->nolock_reason = "Cannot lock securely under Wayland";
+ }
+