mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-25 14:13: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:
committed by
Carlos R. Mafra
parent
752a949492
commit
c7c736e283
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user