]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
cleanup : generic resize function (in area.c)
[chaz/tint2] / src / systray / systraybar.c
index 2d13af46b457eb0c908cb7b01f8464530f1e1079..22fc50ba978a126ee7d328b001f7019d25cfeb72 100644 (file)
@@ -95,8 +95,6 @@ void init_systray()
 
 void init_systray_panel(void *p)
 {
-       Panel *panel =(Panel*)p;
-
        systray.area.parent = p;
        systray.area.panel = p;
        
@@ -107,9 +105,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 +424,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 +486,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.025391 seconds and 4 git commands to generate.