]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
remove flickering on systray
[chaz/tint2] / src / systray / systraybar.c
index d382d8a72eaa5c5ce61e8b350f6ef8d8f0c63d67..f0adce7258220d9687fb11afe9378eaea80b7fdf 100644 (file)
@@ -42,6 +42,7 @@ Window net_sel_win = None, hint_win = None;
 
 // freedesktop specification doesn't allow multi systray
 Systraybar systray;
+int refresh_systray;
 
 
 void init_systray()
@@ -56,7 +57,9 @@ void init_systray()
 
        systray.area.parent = panel;
        systray.area.panel = panel;
+       systray.area._draw_foreground = draw_systray;
        systray.area._resize = resize_systray;
+       refresh_systray = 0;
 
        // configure systray
        // draw only one systray (even with multi panel)
@@ -93,6 +96,13 @@ void cleanup_systray()
 }
 
 
+void draw_systray(void *obj, cairo_t *c, int active)
+{
+       // tint2 don't draw systray icons. just the background.
+       refresh_systray = 1;
+}
+
+
 void resize_systray(void *obj)
 {
        Systraybar *sysbar = obj;
@@ -310,7 +320,7 @@ void net_message(XClientMessageEvent *e)
 }
 
 
-void refresh_systray()
+void refresh_systray_icon()
 {
        TrayWindow *traywin;
        GSList *l;
This page took 0.022457 seconds and 4 git commands to generate.