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>
This commit is contained in:
Chris Wilson 2014-02-18 07:56:07 +00:00
parent e860b3eaed
commit ecc20fbcf8
1 changed files with 2 additions and 1 deletions

View File

@ -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;