Draw panel before systray to reduce flicker
This commit is contained in:
parent
330f1093bb
commit
8ec7f2dd9c
2 changed files with 17 additions and 17 deletions
14
src/panel.c
14
src/panel.c
|
@ -667,13 +667,13 @@ void set_panel_layer(Panel *p, Layer layer)
|
||||||
state[3] = layer == BOTTOM_LAYER ? server.atom._NET_WM_STATE_BELOW : server.atom._NET_WM_STATE_ABOVE;
|
state[3] = layer == BOTTOM_LAYER ? server.atom._NET_WM_STATE_BELOW : server.atom._NET_WM_STATE_ABOVE;
|
||||||
int num_atoms = layer == NORMAL_LAYER ? 3 : 4;
|
int num_atoms = layer == NORMAL_LAYER ? 3 : 4;
|
||||||
XChangeProperty(server.display,
|
XChangeProperty(server.display,
|
||||||
p->main_win,
|
p->main_win,
|
||||||
server.atom._NET_WM_STATE,
|
server.atom._NET_WM_STATE,
|
||||||
XA_ATOM,
|
XA_ATOM,
|
||||||
32,
|
32,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
(unsigned char *)state,
|
(unsigned char *)state,
|
||||||
num_atoms);
|
num_atoms);
|
||||||
}
|
}
|
||||||
|
|
||||||
void replace_panel_all_desktops(Panel *p)
|
void replace_panel_all_desktops(Panel *p)
|
||||||
|
|
20
src/tint.c
20
src/tint.c
|
@ -1734,6 +1734,16 @@ start:
|
||||||
0);
|
0);
|
||||||
XSetWindowBackgroundPixmap(server.display, panel->main_win, panel->hidden_pixmap);
|
XSetWindowBackgroundPixmap(server.display, panel->main_win, panel->hidden_pixmap);
|
||||||
} else {
|
} else {
|
||||||
|
XCopyArea(server.display,
|
||||||
|
panel->temp_pmap,
|
||||||
|
panel->main_win,
|
||||||
|
server.gc,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
panel->area.width,
|
||||||
|
panel->area.height,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
if (panel == (Panel *)systray.area.panel) {
|
if (panel == (Panel *)systray.area.panel) {
|
||||||
if (refresh_systray && panel && !panel->is_hidden) {
|
if (refresh_systray && panel && !panel->is_hidden) {
|
||||||
refresh_systray = FALSE;
|
refresh_systray = FALSE;
|
||||||
|
@ -1741,16 +1751,6 @@ start:
|
||||||
refresh_systray_icons();
|
refresh_systray_icons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XCopyArea(server.display,
|
|
||||||
panel->temp_pmap,
|
|
||||||
panel->main_win,
|
|
||||||
server.gc,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
panel->area.width,
|
|
||||||
panel->area.height,
|
|
||||||
0,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (first_render) {
|
if (first_render) {
|
||||||
|
|
Loading…
Reference in a new issue