Workaround for what seems to be a race in Xserver
There seems to be a race between DamageAdd (what the client uses to report damage to Xserver) and DamageSubtract (what compton uses to clear the reported damage, so it can receive new ones). I am not sure how to confirm this. But this (terrible) workaround seems to solve this problem.
This commit is contained in:
parent
72231098d1
commit
967d9f32ea
|
@ -2089,7 +2089,7 @@ paint_all(session_t *ps, XserverRegion region, XserverRegion region_real, win *t
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
repair_win(session_t *ps, win *w) {
|
repair_win(session_t *ps, win *w, XDamageNotifyEvent *de) {
|
||||||
if (IsViewable != w->a.map_state)
|
if (IsViewable != w->a.map_state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2097,12 +2097,8 @@ repair_win(session_t *ps, win *w) {
|
||||||
|
|
||||||
if (!w->ever_damaged) {
|
if (!w->ever_damaged) {
|
||||||
parts = win_extents(ps, w);
|
parts = win_extents(ps, w);
|
||||||
set_ignore_next(ps);
|
|
||||||
XDamageSubtract(ps->dpy, w->damage, None, None);
|
|
||||||
} else {
|
} else {
|
||||||
parts = XFixesCreateRegion(ps->dpy, 0, 0);
|
parts = XFixesCreateRegion(ps->dpy, (XRectangle[]){de->area}, 1);
|
||||||
set_ignore_next(ps);
|
|
||||||
XDamageSubtract(ps->dpy, w->damage, None, parts);
|
|
||||||
XFixesTranslateRegion(ps->dpy, parts,
|
XFixesTranslateRegion(ps->dpy, parts,
|
||||||
w->a.x + w->a.border_width,
|
w->a.x + w->a.border_width,
|
||||||
w->a.y + w->a.border_width);
|
w->a.y + w->a.border_width);
|
||||||
|
|
|
@ -878,7 +878,7 @@ bool add_win(session_t *ps, Window id, Window prev) {
|
||||||
|
|
||||||
// Create Damage for window
|
// Create Damage for window
|
||||||
set_ignore_next(ps);
|
set_ignore_next(ps);
|
||||||
new->damage = XDamageCreate(ps->dpy, id, XDamageReportNonEmpty);
|
new->damage = XDamageCreate(ps->dpy, id, XDamageReportRawRectangles);
|
||||||
}
|
}
|
||||||
|
|
||||||
calc_win_size(ps, new);
|
calc_win_size(ps, new);
|
||||||
|
|
Loading…
Reference in New Issue