From a517c16f5e06a3fe80158617664eac8e10092411 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Wed, 13 May 2026 17:56:46 +0200 Subject: [PATCH] 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. --- WINGs/wwindow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WINGs/wwindow.c b/WINGs/wwindow.c index 9e3bddb..9b816a6 100644 --- a/WINGs/wwindow.c +++ b/WINGs/wwindow.c @@ -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();