From 36064dca9097df896b4b1b49c9c68775f1728846 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Aug 2009 10:27:16 +1000 Subject: Add EvdevPostButtonEvent API to immediately post a button event (#23269) The wheel emulation code needs this API. When the timer expires, the event must be posted immediately, not enqueued onto the internal event queue. Otherwise, the emulated middle button press is enqueued only and no event is sent until the next physical event (and its EV_SYN) arrives. Since the timer is triggered outside of the SIGIO and SIGIO is blocked during this period anyway, we could also just enqueue the event and flush by simulating an EV_SYN. It's easier this way though. X.Org Bug 23269 Signed-off-by: Peter Hutterer Acked-by: Oliver McFadden --- src/emuMB.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/emuMB.c') diff --git a/src/emuMB.c b/src/emuMB.c index ac763cd..199c0d7 100644 --- a/src/emuMB.c +++ b/src/emuMB.c @@ -198,7 +198,7 @@ EvdevMBEmuTimer(InputInfoPtr pInfo) pEvdev->emulateMB.pending = FALSE; if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) { - EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0)); + EvdevPostButtonEvent(pInfo, abs(id), (id >= 0)); pEvdev->emulateMB.state = stateTab[pEvdev->emulateMB.state][4][2]; } else { -- cgit v1.2.3