diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-18 07:56:07 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-18 07:56:07 +0000 |
commit | ecc20fbcf8d5adb6c3b7d005c01788e35bba9d3c (patch) | |
tree | bbbe8a704b3d5f0ab51eba24d0e38ad2b6e55866 | |
parent | e860b3eaedcb5d56745d5bcc9ce720e9a0e9c293 (diff) |
intel-virtual-output: Discard unwanted events from the mouse recorder
X always sends MappingNotify events (there is no way for the client
to ignore them). In particular, MappingNotify would be sent after a VT
switch, and this would knock out our ability to track the cursor..
Reported-by: Raul Dias <raul@dias.com.br>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75115
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | tools/virtual.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index cba247bf..8b8d5111 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -2987,7 +2987,8 @@ int main(int argc, char **argv) if (reconfigure && context_update(&ctx)) display_reset_damage(ctx.display); - XPending(ctx.record); + while (XPending(ctx.record)) /* discard all implicit events */ + XNextEvent(ctx.record, &e); if (ctx.timer_active && read(ctx.timer, &count, sizeof(count)) > 0) { struct clone *clone; |