Guard WINGs realizeWindow against NULL display in Wayland mode

When a menu entry triggers a WINGs dialog (e.g. 'Run...'), the
realizeObserver notification calls realizeWindow which does X11 calls
(XSetClassHint, XAllocWMHints). In Wayland mode scr->display is NULL,
causing a segfault. Skip the entire function when display is NULL.
This commit is contained in:
Levi Neely 2026-05-13 17:56:46 +02:00
parent fb2d0ab2ef
commit a517c16f5e
1 changed files with 3 additions and 0 deletions

View File

@ -417,6 +417,9 @@ static void realizeWindow(WMWindow * win)
Atom atoms[4];
int count;
if (!scr->display)
return;
classHint = XAllocClassHint();
classHint->res_name = win->wname;
classHint->res_class = WMGetApplicationName();