remove flickering on systray
git-svn-id: http://tint2.googlecode.com/svn/trunk@120 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user