diff --git a/NEWS b/NEWS index 9f391768..c6bf3e6f 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,15 @@ your CPU unnecessarily (0 wakeups when idle, instead of 4). So if you edit the WMRootMenu file by hand (or by using 'wmgenmenu'), there is no need to restart wmaker for the changes to take effect. +DockApp recognition +------------------- + +In addition to applications with only Withdrawn windows, Window Maker +will now treat any application with its WM_CLASS res_class set as +"DockApp". This provides an easy workaround for toolkits like gtk+ that +do not allow creation of windows with the initial_state member of +XWMHints set to WithdrawnState. + --- 0.92.0 diff --git a/src/window.c b/src/window.c index 80259830..ed47d968 100644 --- a/src/window.c +++ b/src/window.c @@ -677,6 +677,11 @@ WWindow *wManageWindow(WScreen *scr, Window window) wwin->wm_gnustep_attr = NULL; } + if (wwin->wm_class != NULL && strcmp(wwin->wm_class, "DockApp") == 0) { + wwin->flags.is_dockapp = 1; + withdraw = True; + } + wwin->client_leader = PropGetClientLeader(window); if (wwin->client_leader != None) wwin->main_window = wwin->client_leader; @@ -692,6 +697,7 @@ WWindow *wManageWindow(WScreen *scr, Window window) } else if (wwin->wm_hints->initial_state == WithdrawnState) { + wwin->flags.is_dockapp = 1; withdraw = True; } } @@ -759,6 +765,9 @@ WWindow *wManageWindow(WScreen *scr, Window window) } } + if (wwin->flags.is_dockapp) + WSETUFLAG(wwin, shared_appicon, 0); + if (!withdraw && wwin->main_window && WFLAGP(wwin, shared_appicon)) { char *buffer, *instance, *class; WFakeGroupLeader *fPtr; diff --git a/src/window.h b/src/window.h index 867e2220..ea61c28d 100644 --- a/src/window.h +++ b/src/window.h @@ -261,6 +261,7 @@ typedef struct WWindow { /* info flags */ unsigned int is_gnustep:1; /* 1 if the window belongs to a GNUstep app */ + unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */ unsigned int buttons_dont_fit:1; unsigned int rebuild_texture:1; /* the window was resized and