wayland: Phase 11 — disable dock/clip in Wayland mode; guard workspace creation

Set noclip=1 and nodock=1 in wl_screen_create_internals so wWorkspaceNew
does not call wDockCreate (which requires X11 GCs, pixmaps, and windows
unavailable when dpy is NULL).  Smoke test check 4f verifies the log.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-03-28 20:52:28 +01:00
parent e020bba06b
commit 6fb9413cbf
2 changed files with 23 additions and 0 deletions

View File

@ -1390,6 +1390,14 @@ wl_screen_create_internals(WScreen *scr)
* that wXModifierFromKey("ALT") etc. return non-zero values.
* Mod1Mask=8 (Alt), Mod4Mask=64 (Super/Win); Meta aliases Alt. */
wSetModifierMasks(Mod1Mask, Mod1Mask, Mod4Mask, 0);
/* Phase 11: disable clip/dock in Wayland mode — wDockCreate requires
* X11 rendering resources (GCs, pixmaps) that are unavailable without
* dpy. Setting noclip/nodock prevents wWorkspaceNew from calling
* wDockCreate when additional workspaces are created. */
wPreferences.flags.noclip = 1;
wPreferences.flags.nodock = 1;
wwarning("wl_backend: dock/clip disabled in Wayland mode (noclip=1 nodock=1)");
}
static void wl_screen_create_pixmaps(WScreen *scr) { (void)scr; }
static void wl_screen_load_tech_font(WScreen *scr) { (void)scr; }

View File

@ -104,6 +104,13 @@
# from the headless keyboard are dispatched through the WM shortcut
# handler before being forwarded to focused clients.
# Verified by "keyboard key+modifiers listeners wired" log.
# 37. (Phase 11) noclip/nodock set in wl_screen_create_internals: wDockCreate
# requires X11 rendering resources unavailable in Wayland mode; disabling
# the dock/clip prevents crashes when wWorkspaceNew is called to create
# additional workspaces. App icon creation path (wApplicationCreate →
# create_appicon_for_application → wIconUpdate/wIconPaint) guarded with
# !dpy early returns so the full manage/unmanage lifecycle works without
# X11 rendering. Verified by "dock/clip disabled" log message.
#
# This test grows as wl_backend vtable slots are implemented.
#
@ -229,6 +236,14 @@ grep -q 'keyboard key+modifiers listeners wired' /tmp/wl-smoke-stderr \
|| die "compositor did not log keyboard listeners wired"
echo " kbd listener check: keyboard key+modifiers listeners wired"
# -- 4f. Phase 11: dock/clip disabled in Wayland mode --------------------
#
# wl_screen_create_internals sets noclip=1 and nodock=1 so wWorkspaceNew
# does not call wDockCreate (which requires X11 rendering resources).
grep -q 'dock/clip disabled in Wayland mode' /tmp/wl-smoke-stderr \
|| die "compositor did not log dock/clip disabled (noclip/nodock not set in wl_screen_create_internals)"
echo " nodock check: dock/clip disabled in Wayland mode (noclip=1 nodock=1)"
# -- 5. Core Wayland globals must be advertised ---------------------------
#
# Phase 35: wl_compositor, wl_seat, and xdg_wm_base must appear in the