X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Ftint.c;h=d9e02334173f2d0ed4d006a94e6bf78eb824ba98;hb=8abd6d423bffc9cd35928e1911c138163f7dbda9;hp=7c167d8ef3d9f9f8ed3c7ae3c95863c1c27d8b54;hpb=ad50533aef71e9697fe78bb636e64079f198f985;p=chaz%2Ftint2 diff --git a/src/tint.c b/src/tint.c index 7c167d8..d9e0233 100644 --- a/src/tint.c +++ b/src/tint.c @@ -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; + } + } + } } } }