path: root/src/draglock.c
diff options
authorOliver McFadden <>2009-08-02 12:03:04 +0300
committerPeter Hutterer <>2009-08-04 16:07:17 +1000
commit69d6ff3e01263ce2d52ed18b08f054bf3fdb923c (patch)
tree117bd91d00a9e6e2ee572d7de40c6facddfba4e4 /src/draglock.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 <>
Diffstat (limited to 'src/draglock.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/draglock.c b/src/draglock.c
index 414166f..203f25c 100644
--- a/src/draglock.c
+++ b/src/draglock.c
@@ -152,13 +152,13 @@ void
EvdevDragLockLockButton(InputInfoPtr pInfo, unsigned int button)
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
- BOOL state=0;
+ BOOL state = 0;
/* update button state */
state = pEvdev->dragLock.lock_state[button - 1] ? FALSE : TRUE;
pEvdev->dragLock.lock_state[button - 1] = state;
- xf86PostButtonEvent(pInfo->dev, 0, button, state, 0, 0);
+ EvdevPostButtonEvent(pInfo, button, state);
/* Filter button presses looking for either a meta button or the