]> Dogcows Code - chaz/tint2/blobdiff - src/tint.c
*fix* only changed systray icons are rendered
[chaz/tint2] / src / tint.c
index 7c167d8ef3d9f9f8ed3c7ae3c95863c1c27d8b54..d9e02334173f2d0ed4d006a94e6bf78eb824ba98 100644 (file)
@@ -849,9 +849,18 @@ int main (int argc, char *argv[])
                                                break;
 
                                        default:
-                                               if (e.type == XDamageNotify+damage_event)
-                                                       // TODO: update only the damaged icon, not all of them
-                                                       systray.area.redraw = 1;
+                                               if (e.type == XDamageNotify+damage_event) {
+                                                       TrayWindow *traywin;
+                                                       GSList *l;
+                                                       XDamageNotifyEvent* de = (XDamageNotifyEvent*)&e;
+                                                       for (l = systray.list_icons; l ; l = l->next) {
+                                                               traywin = (TrayWindow*)l->data;
+                                                               if ( traywin->id == de->drawable ) {
+                                                                       systray_render_icon(traywin);
+                                                                       break;
+                                                               }
+                                                       }
+                                               }
                                }
                        }
                }
This page took 0.023511 seconds and 4 git commands to generate.