Fix stuck appicon from embedded apps
commitb16181143ce9ef3a32f74363308f0a3bc8e30842
authorBrad Jorsch <anomie@users.sourceforge.net>
Tue, 5 Oct 2010 20:15:14 +0000 (5 16:15 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 7 Oct 2010 10:04:31 +0000 (7 12:04 +0200)
tree0d7ae0c500ed5f4be543ac6fd1358116b90a5ebe
parent4b894021d9cdebb12076d87ba798f965de422300
Fix stuck appicon from embedded apps

When applications are embedded in firefox via mozplugger, e.g. ooffice
for viewing .doc files or xpdf for viewing pdfs, and the embedded
application opens a popup window, we end up with a shared appicon for
the embedded app that remains until Window Maker is restarted.

The underlying cause is that mozplugger winds up reparenting the
embedded app's original leader window to a subwindow of itself, so
wmaker's SubstructureNotifyMask on the root window no longer picks up
the DestroyNotify when that original leader is destroyed.

It seems easy to fix once you track down the problem: when fixing
several other properties in fixLeaderProperties(), add
StructureNotifyMask so we get DestroyNotify no matter where the leader
gets reparented to. A more targeted fix would only add
StructureNotifyMask when the fake group's origLeader is set, but I don't
think a few extra structure notifications are going to cause us any real
problems.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
src/window.c