diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 447a79a..35cb406 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -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; } diff --git a/tests/wl-smoke-test.sh b/tests/wl-smoke-test.sh index 8a59a6f..1691a9c 100755 --- a/tests/wl-smoke-test.sh +++ b/tests/wl-smoke-test.sh @@ -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