Compare commits

...

4 Commits

Author SHA1 Message Date
Peter Hutterer
d5969caabe evdev 2.2.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-19 13:45:57 +10:00
Peter Hutterer
5a4b0ba33d Finalize the middle button emulation when a read error occurs (#23048)
If a read error occurs, remove the block and wakeup handlers for middle
mouse button emulation. Otherwise, they'll still be around after the device
has been reopened and overwritten with the new ones created by EvdevOn. Once
this happened, future removal of the device can lead to a server crash.

X.Org Bug 23048 <http://bugs.freedesktop.org/show_bug.cgi?id=23048>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f2dc0681fe)
2009-10-19 13:43:59 +10:00
Peter Hutterer
cd24c2cc18 evdev 2.2.5 2009-08-21 09:03:10 +10:00
Peter Hutterer
c8a0f1cf36 Only take the driver-internal button mapping to count buttons (#23405)
Regression:
    If a user has multiple buttons mapped to the same button number, the
    number of buttons counted is set to a wrong value.  e.g. a button
    mapping of 1 1 1 for a mouse with three buttons would only initialize 1
    button to the X server.

    In the future, the user cannot change this button mapping as the server
    only knows about one button.

The user-supplied button map (option ButtonMapping) shouldn't matter when
counting the buttons. Only the driver-internal mapping (BTN_0 -> button 1,
etc.) matters.

X.Org Bug 23405 <http://bugs.freedesktop.org/show_bug.cgi?id=23405>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 415b6ffa95)
2009-08-20 11:10:13 +10:00
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-evdev],
2.2.4,
2.2.6,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-evdev)

View File

@@ -576,6 +576,7 @@ EvdevReadInput(InputInfoPtr pInfo)
{
if (errno == ENODEV) /* May happen after resume */
{
EvdevMBEmuFinalize(pInfo);
xf86RemoveEnabledDevice(pInfo);
close(pInfo->fd);
pInfo->fd = -1;
@@ -1544,8 +1545,7 @@ EvdevProbe(InputInfoPtr pInfo)
int mapping = 0;
if (TestBit(i, pEvdev->key_bitmask))
{
mapping =
pEvdev->btnmap[EvdevUtilButtonEventToButtonNumber(pEvdev, i)];
mapping = EvdevUtilButtonEventToButtonNumber(pEvdev, i);
if (mapping > num_buttons)
num_buttons = mapping;
}