mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
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>
This commit is contained in:
committed by
Carlos R. Mafra
parent
4b894021d9
commit
b16181143c
@@ -462,6 +462,7 @@ static void fixLeaderProperties(WWindow *wwin)
|
||||
{
|
||||
XClassHint *classHint;
|
||||
XWMHints *hints, *clientHints;
|
||||
XWindowAttributes attr;
|
||||
Window leaders[2], window;
|
||||
char **argv, *command;
|
||||
int argc, i, pid;
|
||||
@@ -515,6 +516,10 @@ static void fixLeaderProperties(WWindow *wwin)
|
||||
XSetCommand(dpy, window, argv, argc);
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure we get notification when this window is destroyed */
|
||||
if (XGetWindowAttributes(dpy, window, &attr))
|
||||
XSelectInput(dpy, window, attr.your_event_mask | StructureNotifyMask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user