From: "Rodolfo García Peñas (kix)" <[email protected]>

The function tileObserver() is now faster, because don't
re-create the icon. Now only draw the icon pixmap.
---
 src/icon.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index c987565..8d9b52a 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -90,12 +90,15 @@ static void appearanceObserver(void *self, WMNotification 
*notif)
        XClearArea(dpy, icon->core->window, 0, 0, icon->core->width, 
icon->core->height, True);
 }
 
-static void tileObserver(void *self, WMNotification * notif)
+static void tileObserver(void *self, WMNotification *notif)
 {
        WIcon *icon = (WIcon *) self;
 
-       icon->force_paint = 1;
-       wIconPaint(icon);
+       /* If the rimage exists, update the icon, else create it */
+       if (icon->file_image)
+               update_icon_pixmap(icon);
+       else
+               wIconPaint(icon);
 
        XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
 }
-- 
1.7.10.4


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

Reply via email to