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

@@ -650,26 +650,29 @@ load_config:
if (panel_refresh) {
panel_refresh = 0;
if (refresh_systray) {
panel = (Panel*)systray.area.panel;
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, None);
}
for (i=0 ; i < nb_panel ; i++) {
panel = &panel1[i];
if (panel == systray.area.panel)
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, None);
if (panel->temp_pmap) XFreePixmap(server.dsp, panel->temp_pmap);
panel->temp_pmap = XCreatePixmap(server.dsp, server.root_win, panel->area.width, panel->area.height, server.depth);
refresh(&panel->area);
XCopyArea(server.dsp, panel->temp_pmap, panel->main_win, server.gc, 0, 0, panel->area.width, panel->area.height, 0, 0);
if (panel == systray.area.panel) {
// tint2 doen't draw systray icons. it just redraw background.
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap);
// force icon's refresh
refresh_systray();
}
}
XFlush (server.dsp);
if (refresh_systray) {
refresh_systray = 0;
panel = (Panel*)systray.area.panel;
// tint2 doen't draw systray icons. it just redraw background.
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap);
// force icon's refresh
refresh_systray_icon();
}
}
}
}