wayland: Phase 76 — frame NULL guard in switchpanel.c title display
wSwitchPanelSelectNext, wSwitchPanelSelectFirst, and wSwitchPanelHandleEvent all access wwin->frame->title to display the window title in the Alt-Tab switcher panel. Fall back to wwin->wm_class when frame is NULL so Wayland windows appear in the switcher without crashing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2c7407a6c8
commit
c7acf9d89d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in New Issue