]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
panel_items : fixed hide/unhide of baterry and systray
[chaz/tint2] / src / systray / systraybar.c
index 2d13af46b457eb0c908cb7b01f8464530f1e1079..e5bb7a1260a716c4237e76195a4ad4d832fc5cdf 100644 (file)
@@ -107,9 +107,9 @@ void init_systray_panel(void *p)
                        count++;
        }
        if (count == 0)
-               systray.area.on_screen = 0;
+               hide(&systray.area);
        else 
-               systray.area.on_screen = 1;
+               show(&systray.area);
        refresh_systray = 0;
 }
 
@@ -426,7 +426,7 @@ gboolean add_icon(Window id)
        traywin->damage = 0;
 
        if (systray.area.on_screen == 0)
-               systray.area.on_screen = 1;
+               show(&systray.area);
 
        if (systray.sort == 3)
                systray.list_icons = g_slist_prepend(systray.list_icons, traywin);
@@ -488,10 +488,9 @@ void remove_icon(TrayWindow *traywin)
                if (!((TrayWindow*)l->data)->hide)
                        count++;
        }
-       if (count == 0) {
-               systray.area.on_screen = 0;
-               systray.area.width = 0;
-       }
+       if (count == 0)
+               hide(&systray.area);
+               
        // changed in systray
        systray.area.resize = 1;
        panel_refresh = 1;
This page took 0.021202 seconds and 4 git commands to generate.