diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 21:55:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 22:29:55 +0100 |
commit | 2263f8f26fb3c4fabceac2e192e95c5d26a4d173 (patch) | |
tree | e8556978c04df146e694de86c1f2a009c765fe7c /tools | |
parent | 5dea07c31d4d57d8d9aff68f2a9ffd73e828643f (diff) |
intel-virtual-overlay: Reset damage across modesets
Some versions of the Xserver lose Damage tracking across the modeset,
causing a loss of damage notifications and repainting to cease on the
virtual outputs. We can workaround this by reattaching the damage every
time we receive notification that the local Screen configuration
changes.
Reported-and-tested-by: Severin Strobl <fd@severin-strobl.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtual.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index 257f37f3..4da2f3ab 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -1760,9 +1760,22 @@ static int display_init_damage(struct display *display) if (display->damage == 0) return EACCES; + display->flush = 1; return 0; } +static void display_reset_damage(struct display *display) +{ + Damage damage; + + damage = XDamageCreate(display->dpy, display->root, XDamageReportRawRectangles); + if (damage) { + XDamageDestroy(display->dpy, display->damage); + display->damage = damage; + display->flush = 1; + } +} + static void display_init_randr_hpd(struct display *display) { int major, minor; @@ -2632,8 +2645,10 @@ int main(int argc, char **argv) ret--; } - if (reconfigure) + if (reconfigure) { context_update(&ctx); + display_reset_damage(ctx.display); + } if (rr_update) { for (i = 0; i < ctx.nclone; i++) |