diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 19:36:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-05 19:36:13 +0100 |
commit | 12de799598ffbbe056bd4455efefa62d4b081d98 (patch) | |
tree | 388b2a2956e09d8c442d6a9db4ff0d82946845f6 /tools | |
parent | 1ce52e93315afe7fdb33c315705fe22e69eb908c (diff) |
intel-virtual-output: Flush the damage received message back to the local display
After processing the Damage notification, we need to send a message back
to the Xserver to clear the pending damage before we will be sent more
events. To make sure that message is sent we need to flush the output,
as we may never flush the output queue otherwise.
Reported-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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index de4287a0..a5fb36eb 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -2608,8 +2608,11 @@ int main(int argc, char **argv) } } while (XPending(ctx.display->dpy) || poll(&ctx.pfd[1], 1, 0) > 0); - if (damaged) + if (damaged) { + DBG(("%s clearing damage (after %d events)\n", DisplayString(ctx.display->dpy), damaged)); XDamageSubtract(ctx.display->dpy, ctx.display->damage, None, None); + ctx.display->flush = 1; + } ret--; } @@ -2662,6 +2665,7 @@ int main(int argc, char **argv) for (i = 0; i < ctx.ndisplay; i++) display_flush(&ctx.display[i]); + DBG(("%s timer still active? %d\n", DisplayString(ctx.display->dpy), ret != 0)); ctx.timer_active = ret != 0; } } |