Ignore shared_appicon if an appicon already exists
commitb305eb84fb16b41658650b06ec9abc2b571b3a1c
authorBrad Jorsch <anomie@users.sourceforge.net>
Tue, 28 Sep 2010 18:08:52 +0000 (28 14:08 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 7 Oct 2010 10:04:30 +0000 (7 12:04 +0200)
treeb6ba20bb0f7b92f7a984ffdd4cfd199aadd7fd48
parent88c6a51547a4786e76623a961e70f5b0ce139cfa
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>
src/window.c