diff --git a/src/switchpanel.c b/src/switchpanel.c index fa61032..651e154 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -645,7 +645,9 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back, int ignore_minimi scrollIcons(panel, panel->current - panel->firstVisible - panel->visibleCount + 1); if (panel->win) { - drawTitle(panel, panel->current, wwin->frame->title); + /* Phase 76: Wayland windows have no frame — fall back to wm_class */ + drawTitle(panel, panel->current, + wwin->frame ? wwin->frame->title : wwin->wm_class); if (panel->current != orig) changeImage(panel, orig, 0, dim, False); changeImage(panel, panel->current, 1, False, False); @@ -673,7 +675,8 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back) } wwin = WMGetFromArray(panel->windows, panel->current); - title = wwin->frame->title; + /* Phase 76: Wayland windows have no frame — fall back to wm_class */ + title = wwin->frame ? wwin->frame->title : wwin->wm_class; if (panel->win) { for (WMArrayFirst(panel->windows, &(i)); (i) != WANotFound; WMArrayNext(panel->windows, &(i))) @@ -713,7 +716,9 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event) wwin = WMGetFromArray(panel->windows, focus); - drawTitle(panel, panel->current, wwin->frame->title); + /* Phase 76: Wayland windows have no frame — fall back to wm_class */ + drawTitle(panel, panel->current, + wwin->frame ? wwin->frame->title : wwin->wm_class); return wwin; } diff --git a/tests/wl-smoke-test.sh b/tests/wl-smoke-test.sh index 18320df..3b950ee 100755 --- a/tests/wl-smoke-test.sh +++ b/tests/wl-smoke-test.sh @@ -86,8 +86,11 @@ # 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). +# for Wayland windows; change_focus_and_raise guards fullscreen stacking +# restore (build-only check). +# 34. (Phase 76) switchpanel.c: Alt-Tab panel title falls back to +# wwin->wm_class when frame is NULL so Wayland windows appear in the +# switcher without crashing (build-only check). # # This test grows as wl_backend vtable slots are implemented. #