summaryrefslogtreecommitdiff
path: root/src/emuMB.c
diff options
context:
space:
mode:
authorOliver McFadden <oliver.mcfadden@nokia.com>2009-08-02 12:03:04 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2009-08-04 16:07:17 +1000
commit69d6ff3e01263ce2d52ed18b08f054bf3fdb923c (patch)
tree117bd91d00a9e6e2ee572d7de40c6facddfba4e4 /src/emuMB.c
parent6f4634111a83808bc52e7e53733cf2d3bab0cccd (diff)
evdev: Use the EvdevPost...Event() functions in the emulation code.
This is similar to commit 1f641d75edba7394201c1c53938215bae696791b. It provides the same functionality of queuing the (in this case emulated) events and waiting until an EV_SYN synchronization event is received before posting them to the server. This preserves the order of events (both real and emulated) and ensures that MotionNotify events will always be posted first. It also unifies the event posting into a few small functions which improves maintainability. From this point on, you should never use the xf86Post...Event() functions in new code, but rather the EvdevPost...Event() versions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/emuMB.c')
-rw-r--r--src/emuMB.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emuMB.c b/src/emuMB.c
index b29f552..dc689b6 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) {
- xf86PostButtonEvent(pInfo->dev, 0, abs(id), (id >= 0), 0, 0);
+ EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
pEvdev->emulateMB.state =
stateTab[pEvdev->emulateMB.state][4][2];
} else {
@@ -248,12 +248,12 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0)
{
- xf86PostButtonEvent(pInfo->dev, 0, abs(id), (id >= 0), 0, 0);
+ EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
ret = TRUE;
}
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0)
{
- xf86PostButtonEvent(pInfo->dev, 0, abs(id), (id >= 0), 0, 0);
+ EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
ret = TRUE;
}