From c7c736e28364f627fcb023adf60c2713a915df9f Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Tue, 17 Mar 2026 21:33:50 -0400 Subject: [PATCH] wmaker: set proper group window class when hint is empty This patch is a follow up of commit 073235ada42e04d0eed0e70a2edd432cdef2a5eb as it appears there is the same issue with the WMState configuration file when a session state is saved. For example, with terminator, the file will contain: ... Applications = ( { Dock = Dock; Maximized = 0x0000; Name = terminator.; ... After the patch: ... Applications = ( { Dock = Dock; Maximized = 0x0000; Name = terminator.Terminator; ... --- src/session.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/session.c b/src/session.c index af7901bc..89df5b54 100644 --- a/src/session.c +++ b/src/session.c @@ -181,8 +181,11 @@ static WMPropList *makeWindowState(WWindow * wwin, WApplication * wapp) } if (PropGetWMClass(win, &class, &instance)) { - if (class && instance) - snprintf(buffer, sizeof(buffer), "%s.%s", instance, class); + if (class && instance) { + if (class[0] == '\0' && wwin->wm_class && wwin->wm_class[0] != '\0') + class = strdup(wwin->wm_class); + snprintf(buffer, sizeof(buffer), "%s%s%s", instance, class[0] ? "." : "", class); + } else if (instance) snprintf(buffer, sizeof(buffer), "%s", instance); else if (class)