aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/linux/evdev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-16 13:46:01 +0000
committermarha <marha@users.sourceforge.net>2009-11-16 13:46:01 +0000
commit578938f1cdd5a06dd6fa28167d575ec980322a5d (patch)
treee31cf77fab7cc6e005b0e726e7951d7eef79550f /xorg-server/hw/kdrive/linux/evdev.c
parent0032f9b66d63a4b1c5222edb8603fb60da379fb0 (diff)
downloadvcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.gz
vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.tar.bz2
vcxsrv-578938f1cdd5a06dd6fa28167d575ec980322a5d.zip
Update to git master branch of xserver.
Diffstat (limited to 'xorg-server/hw/kdrive/linux/evdev.c')
-rw-r--r--xorg-server/hw/kdrive/linux/evdev.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/xorg-server/hw/kdrive/linux/evdev.c b/xorg-server/hw/kdrive/linux/evdev.c
index f6017ba51..096a2ddc3 100644
--- a/xorg-server/hw/kdrive/linux/evdev.c
+++ b/xorg-server/hw/kdrive/linux/evdev.c
@@ -243,7 +243,9 @@ EvdevPtrEnable (KdPointerInfo *pi)
if (fd < 0)
return BadMatch;
-
+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
+ perror ("Grabbing evdev mouse device failed");
+
if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0)
{
perror ("EVIOCGBIT 0");
@@ -335,6 +337,10 @@ EvdevPtrDisable (KdPointerInfo *pi)
return;
KdUnregisterFd (pi, ke->fd, TRUE);
+
+ if (ioctl (ke->fd, EVIOCGRAB, 0) < 0)
+ perror ("Ungrabbing evdev mouse device failed");
+
xfree (ke);
pi->driverPrivate = 0;
}
@@ -425,6 +431,9 @@ EvdevKbdEnable (KdKeyboardInfo *ki)
if (fd < 0)
return BadMatch;
+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
+ perror ("Grabbing evdev keyboard device failed");
+
if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0) {
perror ("EVIOCGBIT 0");
close (fd);
@@ -496,6 +505,10 @@ EvdevKbdDisable (KdKeyboardInfo *ki)
return;
KdUnregisterFd (ki, ke->fd, TRUE);
+
+ if (ioctl (ke->fd, EVIOCGRAB, 0) < 0)
+ perror ("Ungrabbing evdev keyboard device failed");
+
xfree (ke);
ki->driverPrivate = 0;
}