diff --git a/src/cycling.c b/src/cycling.c index 4c7612f..4fab84c 100644 --- a/src/cycling.c +++ b/src/cycling.c @@ -40,6 +40,9 @@ static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin) { WNativeWindow swwin = wSwitchPanelGetWindow(swpanel); + if (!wwin->frame) + return; /* Phase 75: Wayland — no frame window to raise */ + if (wwin->flags.mapped || wwin->flags.shaded) { if (swwin != WNATIVE_NONE) { WNativeWindow win[2]; @@ -60,7 +63,7 @@ static WWindow *change_focus_and_raise(WWindow *newFocused, WWindow *oldFocused, return oldFocused; /* allow the focused window to float on top of a fullscreen window */ - if (oldFocused->flags.fullscreen) + if (oldFocused->flags.fullscreen && oldFocused->frame) ChangeStackingLevel(oldFocused->frame->core, WMNormalLevel); wWindowFocus(newFocused, oldFocused); diff --git a/tests/wl-smoke-test.sh b/tests/wl-smoke-test.sh index 73e6fd3..18320df 100755 --- a/tests/wl-smoke-test.sh +++ b/tests/wl-smoke-test.sh @@ -85,6 +85,9 @@ # client_synth_configure for Wayland windows; wWindowSingleFocus and # wWindowSaveState use client geometry fallback when frame is NULL # (build-only check). +# 33. (Phase 75) Frame NULL guards in cycling.c: raiseWindow skips stacking +# for Wayland windows; change_focus_and_raise skips fullscreen stacking +# restore when frame is NULL (build-only check). # # This test grows as wl_backend vtable slots are implemented. #