Add calls to wAppIconPaint when wIconUpdate is called on the app icon.

Signed-off-by: Brad Jorsch <[email protected]>
---
 src/client.c |    1 +
 src/window.c |   10 ++++++++--
 src/wmspec.c |    6 ++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/client.c b/src/client.c
index a1dab72..16a4f11 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 0a585eb..3ff378a 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 (wSharedApplicationOf(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 4998ee6..1d50246 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)
-- 
1.7.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to