remove flickering on systray

git-svn-id: http://tint2.googlecode.com/svn/trunk@120 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr
2009-06-20 15:08:33 +00:00
parent 4c5408d5fd
commit c7ba119ff2
4 changed files with 31 additions and 12 deletions

View 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;

View File

@@ -33,6 +33,7 @@ typedef struct
extern Window net_sel_win;
extern Systraybar systray;
extern int refresh_systray;
void init_systray();
@@ -44,9 +45,11 @@ void net_message(XClientMessageEvent *e);
void remove_icon(TrayWindow *traywin);
void draw_systray(void *obj, cairo_t *c, int active);
void resize_systray(void *obj);
void refresh_systray();
void refresh_systray_icon();
#endif