1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-25 06:03:31 +01:00

wmaker: set proper group window class when hint is empty

This patch is a follow up of commit
073235ada4
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;
      ...
This commit is contained in:
David Maciejak
2026-03-17 21:33:50 -04:00
committed by Carlos R. Mafra
parent 752a949492
commit c7c736e283

View File

@@ -181,8 +181,11 @@ static WMPropList *makeWindowState(WWindow * wwin, WApplication * wapp)
} }
if (PropGetWMClass(win, &class, &instance)) { if (PropGetWMClass(win, &class, &instance)) {
if (class && instance) if (class && instance) {
snprintf(buffer, sizeof(buffer), "%s.%s", instance, class); 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) else if (instance)
snprintf(buffer, sizeof(buffer), "%s", instance); snprintf(buffer, sizeof(buffer), "%s", instance);
else if (class) else if (class)