diff --git a/src/client.c b/src/client.c index a1dab72f..16a4f11b 100644 --- a/src/client.c +++ b/src/client.c @@ -478,6 +478,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event) wapp = wApplicationOf(wwin->main_window); if (wapp && wapp->app_icon) { wIconUpdate(wapp->app_icon->icon); + wAppIconPaint(wapp->app_icon); } } diff --git a/src/window.c b/src/window.c index 0a585ebc..bfc0ade4 100644 --- a/src/window.c +++ b/src/window.c @@ -518,7 +518,7 @@ static void fixLeaderProperties(WWindow *wwin) /* Make sure we get notification when this window is destroyed */ if (XGetWindowAttributes(dpy, window, &attr)) - XSelectInput(dpy, window, attr.your_event_mask | StructureNotifyMask); + XSelectInput(dpy, window, attr.your_event_mask | StructureNotifyMask | PropertyChangeMask); } } @@ -1543,7 +1543,13 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed) if (!wwin->flags.internal_window) XRemoveFromSaveSet(dpy, wwin->client_win); - XSelectInput(dpy, wwin->client_win, NoEventMask); + /* If this is a leader window, we still need to listen for + * DestroyNotify and PropertyNotify. */ + if (wApplicationOf(wwin->client_win)) { + XSelectInput(dpy, wwin->client_win, StructureNotifyMask | PropertyChangeMask); + } else { + XSelectInput(dpy, wwin->client_win, NoEventMask); + } XUngrabButton(dpy, AnyButton, AnyModifier, wwin->client_win); XUngrabKey(dpy, AnyKey, AnyModifier, wwin->client_win); diff --git a/src/wmspec.c b/src/wmspec.c index 4998ee64..1d502461 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -42,6 +42,7 @@ #include "framewin.h" #include "actions.h" #include "client.h" +#include "appicon.h" #include "wmspec.h" #include "icon.h" #include "stacking.h" @@ -459,6 +460,11 @@ static void updateIconImage(WWindow * wwin) XFree(property); if (wwin->icon) wIconUpdate(wwin->icon); + WApplication *app = wApplicationOf(wwin->main_window); + if (app && app->app_icon){ + wIconUpdate(app->app_icon->icon); + wAppIconPaint(app->app_icon); + } } static void updateShowDesktop(WScreen * scr, Bool show)