diff --git a/src/window.c b/src/window.c index e56bb638..978f7b88 100644 --- a/src/window.c +++ b/src/window.c @@ -848,6 +848,12 @@ WWindow *wManageWindow(WScreen *scr, Window window) /* // only enter here if PropGetWMClass() succeeds */ PropGetWMClass(wwin->main_window, &class, &instance); + if (!class || class[0] == '\0') { + if (wwin->wm_class && wwin->wm_class[0] != '\0') + class = strdup(wwin->wm_class); + else + class = strdup("default"); + } buffer = StrConcatDot(instance, class); index = WMFindInArray(scr->fakeGroupLeaders, matchIdentifier, (void *)buffer);