1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Ignore shared_appicon if an appicon already exists

An appicon is created for each group of windows, as specified by the
WM_HINTS window_group or the WM_CLIENT_LEADER. The "shared_appicon"
feature ignores the group leader specified by the application, replacing
it with a dummy leader matching the window's WM_CLASS. This causes
issues for dockapps, since each instance of a dockapp needs its own
appicon to display the different icon_windows, so shared_appicon is
automatically disabled for dockapp windows.

If the application creates some dockapp windows (no shared_appicon) and
some regular windows (with shared_appicon) with the same leader, it can
unexpectedly end up with two different appicons: one for the real group
leader it set and one for the fake leader created for shared_appicons.
Both of these appicons will try to use the same icon_window, which may
cause the dockapp window to suddenly lose its contents as they are moved
to the fake leader's appicon.

There is a simple fix: if a WApplication already exists (and has an
appicon) for the app-specified group leader window, disable
shared_appicon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
Brad Jorsch
2010-09-28 14:08:52 -04:00
committed by Carlos R. Mafra
parent 88c6a51547
commit b305eb84fb

View File

@@ -770,6 +770,12 @@ WWindow *wManageWindow(WScreen *scr, Window window)
if (wwin->flags.is_dockapp)
WSETUFLAG(wwin, shared_appicon, 0);
if (wwin->main_window) {
WApplication *app = wApplicationOf(wwin->main_window);
if (app && app->app_icon)
WSETUFLAG(wwin, shared_appicon, 0);
}
if (!withdraw && wwin->main_window && WFLAGP(wwin, shared_appicon)) {
char *buffer, *instance, *class;
WFakeGroupLeader *fPtr;