From 2746f65ac952d7241c58675ba43560295a4b32bb Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 28 Apr 2009 09:34:55 +0200 Subject: [PATCH] dix: fix calculation of number of fake KeyRelease events Signed-off-by: Pierre Ossman --- dix/getevents.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 1e0edbf..8fdb8ea 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,11 +470,15 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, if (noXkbExtension) #endif { - numEvents += GetKeyboardValuatorEvents(events, pDev, - KeyRelease, key_code, - first_valuator, num_valuators, - valuators); - events += numEvents; + int numReleaseEvents; + + numReleaseEvents = GetKeyboardValuatorEvents(events, pDev, + KeyRelease, key_code, + first_valuator, + num_valuators, + valuators); + numEvents += numReleaseEvents; + events += numReleaseEvents; } } -- 1.6.2.2