diff --git a/src/actions.c b/src/actions.c index 31fbc5d..ed393a7 100644 --- a/src/actions.c +++ b/src/actions.c @@ -244,6 +244,8 @@ void wShadeWindow(WWindow *wwin) if (wwin->flags.shaded) return; + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame to shade */ wm_backend->stacking_lower(wwin->client_win); shade_animate(wwin, SHADE); @@ -281,6 +283,8 @@ void wUnshadeWindow(WWindow *wwin) if (!wwin->flags.shaded) return; + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame to unshade */ wwin->flags.shaded = 0; wwin->flags.mapped = 1; @@ -374,6 +378,8 @@ void wMaximizeWindow(WWindow *wwin, int directions, int head) if (!IS_RESIZABLE(wwin)) return; + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame for maximize geometry */ if (!HAS_BORDER(wwin)) has_border = 0; @@ -926,6 +932,8 @@ void wUnmaximizeWindow(WWindow *wwin) if (!wwin->flags.maximized) return; + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame to unmaximize */ if (wwin->flags.shaded) { wwin->flags.skip_next_animation = 1; @@ -1007,6 +1015,8 @@ void wFullscreenWindow(WWindow *wwin) if (wwin->flags.fullscreen) return; + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame for fullscreen */ wwin->flags.fullscreen = True; @@ -1402,6 +1412,8 @@ void wIconifyWindow(WWindow *wwin) if (owner && owner->flags.miniaturized) return; } + if (!wwin->frame) + return; /* Phase 71: Wayland — no frame for iconify */ present = WIN_WORKSPACE(wwin) == wwin->screen_ptr->current_workspace; @@ -1552,6 +1564,10 @@ void wDeiconifyWindow(WWindow *wwin) w_global.ignore_workspace_change = False; return; } + if (!wwin->frame) { + w_global.ignore_workspace_change = False; + return; /* Phase 71: Wayland — no frame for deiconify */ + } if (wwin->transient_for != WNATIVE_NONE && wwin->transient_for != wwin->screen_ptr->root_win) { WWindow *owner = recursiveTransientFor(wwin); diff --git a/tests/wl-smoke-test.sh b/tests/wl-smoke-test.sh index 983e524..2bb9212 100755 --- a/tests/wl-smoke-test.sh +++ b/tests/wl-smoke-test.sh @@ -67,6 +67,10 @@ # 28. (Phase 70) WIN_WORKSPACE macro applied to remaining frame->workspace # reads in actions.c, cycling.c, event.c, moveres.c, placement.c, # switchpanel.c, wmspec.c, workspace.c; write sites keep direct access. +# 29. (Phase 71) Early-return guards added to wShadeWindow, wUnshadeWindow, +# wMaximizeWindow, wUnmaximizeWindow, wFullscreenWindow, wIconifyWindow, +# wDeiconifyWindow so that Wayland windows (frame==NULL) do not crash +# when these actions are triggered (build-only check). # # This test grows as wl_backend vtable slots are implemented. #