]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
update my contribution to the company
[chaz/tint2] / src / systray / systraybar.c
index 23d2ab3821d1b58883ed1a0a380dd36a1bea2626..abf633ecb6b4231ab730a6bd185a7dda87f6fe67 100644 (file)
@@ -1,7 +1,7 @@
 /**************************************************************************
 * Tint2 : systraybar
 *
-* Copyright (C) 2009 thierry lorthiois (lorthiois@bbsoft.fr)
+* Copyright (C) 2009 thierry lorthiois (lorthiois@bbsoft.fr) from Omega distribution
 * based on 'docker-1.5' from Ben Jansens.
 *
 * This program is free software; you can redistribute it and/or
@@ -532,6 +532,11 @@ void systray_render_icon_now(void* t)
        // we made also sure, that we always have a 32 bit visual, i.e. we can safely create 32 bit pixmaps here
        TrayWindow* traywin = t;
        traywin->render_timeout = 0;
+       if ( traywin->width == 0 || traywin->height == 0 ) {
+               // reschedule rendering since the geometry information has not yet been processed (can happen on slow cpu)
+               systray_render_icon(traywin);
+               return;
+       }
 
        // good systray icons support 32 bit depth, but some icons are still 24 bit.
        // We create a heuristic mask for these icons, i.e. we get the rgb value in the top left corner, and
This page took 0.022845 seconds and 4 git commands to generate.