Commit Graph

255 Commits

Author SHA1 Message Date
Peter Hutterer
a64a78791f evdev 2.1 RC 2 xf86-input-evdev-2.0.99.2 2008-10-23 17:16:36 +10:30
Peter Hutterer
09b2a5e87b Silence compiler warning by memsetting the struct properly.
(cherry picked from commit 0ab4c09e50)
2008-10-23 17:15:32 +10:30
Peter Hutterer
fa18a4a38d MB emulation timeout is stored as Time, make the property 32-bit too.
(cherry picked from commit d348eb8ce7)
2008-10-23 17:15:30 +10:30
Peter Hutterer
172523d745 Init ioctl bitmasks to 0, shuts up valgrind too.
(cherry picked from commit 2c1698fa61)
2008-10-23 17:15:28 +10:30
Søren Hauberg
8fb820ffaf Add touchscreen support.
Touchscreens are devices that do not have buttons and only advertise
BTN_TOUCH. Add a new flag to note the device type.

If BTN_TOUCH is detected, change it to BTN_LEFT and process it normally.
(cherry picked from commit 8c39302594)
2008-10-23 17:15:25 +10:30
Julien Cristau
c7893b212d Fix TestBit() on 64bit
Reported by Albert Damen <albrt@gmx.net>
X.Org Bug#18150 <http://bugs.freedesktop.org/show_bug.cgi?id=18150>
(cherry picked from commit f57e8face9)
2008-10-23 17:14:52 +10:30
Peter Hutterer
e9dd721e2d Add option "GrabDevice", don't grab the device by default.
We now have the matching code in the server to set the console to RAW mode and
don't need to grab the devices anymore.

This is an updated version of e8534d47c8, which
was reverted in 6dc4199155.
(cherry picked from commit 4912e2aa7f)
2008-10-23 17:14:49 +10:30
Peter Hutterer
cab104fd9e Don't post keycodes > 255.
If we only have keys > 255 we don't set up a key class rec, so don't post
them. It makes the server unhappy.

Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 7243116f55)
2008-10-23 17:14:45 +10:30
Peter Hutterer
708eb34599 evdev 2.1 RC 1. xf86-input-evdev-2.0.99.1 2008-10-14 17:19:58 +10:30
Peter Hutterer
36a687796f Fix "Device reopened after N attempts" message.
(cherry picked from commit 0089d931ac)
2008-10-14 17:18:08 +10:30
Peter Hutterer
26229df106 Don't init draglock, etc. if we don't have the required capabilities.
(cherry picked from commit 0f5a5ac09e)
2008-10-14 17:18:07 +10:30
Peter Hutterer
f4616d87fc 8-bit properties should use 8-bit storage types...
(cherry picked from commit 36d68b006d)
2008-10-14 17:18:07 +10:30
Peter Hutterer
2aa5ca8cdd Don't include the client-side header anymore. xkbstr.h is server SDK.
(cherry picked from commit bb1f421687)
2008-10-14 17:18:07 +10:30
Peter Hutterer
39263dc65d Tidy up evdev.h
This includes shuffling some functions around so we don't need the prototypes
in evdev.h.
(cherry picked from commit 0405f7b17f)
2008-10-14 17:18:07 +10:30
Peter Hutterer
57521e4e60 Rename DragLockInit to DragLockPreInit, remove superfluous "return".
(cherry picked from commit 088e0a175a)
2008-10-14 17:18:07 +10:30
Peter Hutterer
7da1522309 Register property handler from within the modules, not the main evdev file.
(cherry picked from commit cefedeb205)
2008-10-14 17:18:07 +10:30
Peter Hutterer
b4fcb825fc Clean up program flow - don't call PreInit for "modules" on DEVICE_INIT.
Call the PreInit functions for MB Emulation, wheel emu, and draglock during
PreInit, not on DEVICE_INIT. This way, we only parse the options once and
don't overwrite with defaults when coming back from a VT switch.
(cherry picked from commit b0737bdbd1)
2008-10-14 17:18:07 +10:30
Peter Hutterer
7c955ad050 Janitor: clean up xf86Msg use, might as well use X_CONFIG directly.
(cherry picked from commit 5f2c8a2dcd)
2008-10-14 17:18:07 +10:30
Peter Hutterer
4f80c0f2cb Add property support for ReopenAttempts option.
(cherry picked from commit ff783fce65)
2008-10-14 17:18:07 +10:30
Peter Hutterer
5070d64aa8 Document properties in man page.
(cherry picked from commit c638aa4a88)
2008-10-14 17:18:07 +10:30
Peter Hutterer
caacacf057 Document InvertX/Y options.
(cherry picked from commit b46677e346)
2008-10-14 17:18:07 +10:30
Peter Hutterer
9065d0ccb2 Remove "Path" option.
Path was just an alias for Device anyway, so we might as well not parse it.
By now you should be using HAL anyway which fills in Device for you.
2008-10-11 12:24:54 +10:30
Peter Hutterer
a9fcce1833 Remove parsing of ScreenNumber option.
Was unused anyway, so we might as well not parse it.
2008-10-11 12:24:54 +10:30
Peter Hutterer
ab934d840d Janitor: purge unused headers, reshuffle for readability, fix whitespace errors. 2008-10-11 12:24:54 +10:30
Peter Hutterer
6f6ac98295 Add checkonly handling to property handlers.
If checkonly is TRUE, we can only check if applying the value would succeed.
The value is actually applied if checkonly is FALSE.
2008-10-11 12:24:54 +10:30
Peter Hutterer
a2633c8078 Fix up bad return code in draglock property handler. 2008-10-11 12:24:54 +10:30
Peter Hutterer
e6c699dedc Stricter value checking for property changes. 2008-10-11 12:24:54 +10:30
Julien Cristau
847eac8262 Set pInfo->fd to -1 on DEVICE_CLOSE
This allows the reopen logic to kick in later.
DEVICE_CLOSE gets called on regen, so without this we'd keep a stale
file descriptor in pInfo->fd in subsequent sessions.

Debian bug#496101 (http://bugs.debian.org/496101)
2008-10-11 02:16:25 +02:00
Peter Hutterer
a196672a6b Add property support for axis inversion. 2008-10-03 14:42:02 +09:30
Søren Hauberg
3985d42320 Add support for axis inversion. 2008-10-03 14:41:58 +09:30
Peter Hutterer
e138e4b79a Install xorg-evdev.pc for clients who need evdev-properties.h 2008-10-03 14:39:25 +09:30
Peter Hutterer
125e2b8ce2 Close fd on DEVICE_OFF. (LP #276887)
Leaving the fd open means we still get keyboard events after VT switching
away. Coming back, some of these events are replayed on the application that
has the current focus.

Reproduceable:
1. open terminal, focus.
2. VT switch away
3. type something, preferably a password
4. VT switch back, trigger a mouse event
5. Observe the X server guessing your password.

Closing the fd on DEVICE_OFF fixes this. Reopen is handled by the reopen
code introduced with

    commit 9930477cbe
    Author: Peter Hutterer <peter.hutterer@redhat.com>
    Date:   Tue Aug 26 14:33:40 2008 +0930

        Attempt to re-open devices on read errors.

Launchpad Bug 276887
<https://bugs.edge.launchpad.net/ubuntu/+source/xorg-server/+bug/276887>
2008-10-02 12:09:13 +09:30
Peter Hutterer
91bc0a0ba3 Remove useless initialization of rc. 2008-10-02 12:09:12 +09:30
Peter Hutterer
4c55186aed Change DragLock atom name - prepend with Evdev. 2008-10-02 12:09:10 +09:30
Peter Hutterer
62069b97d2 Move misplaced #endif 2008-09-30 12:24:07 +09:30
Peter Hutterer
2718a5c56b Register property handlers directly, instead of abstracting them.
This removes a left-over from the early device property code where we could
only have a single handler. Now it's easier to just register the handlers for
each subsystem (emulate wheel, draglock and MB emulation).
2008-09-30 12:24:07 +09:30
Peter Hutterer
90d1d494f8 Cleanup: "valid_vals" should be "vals" now. 2008-09-30 12:24:07 +09:30
Peter Hutterer
a77c2622cc Add evdev-properties.h file with #defines for all property names. 2008-09-30 12:24:03 +09:30
Peter Hutterer
84a0e39c0d Use new property API (no ConfigureDP, less args to ChangeDP)
Return appropriate status codes from property handlers.
Make properties non-deletable.
2008-09-26 13:23:35 +09:30
Peter Hutterer
7386937221 draglock: Shut up compiler warning. 2008-09-26 12:56:36 +09:30
Peter Hutterer
fcf8375f2b Don't require randrproto. 2008-09-26 12:56:33 +09:30
Peter Hutterer
9930477cbe Attempt to re-open devices on read errors.
Coming back from resume may leave us with a file descriptor that can be opened
but fails on the first read (ENODEV).
In this case, try to open the device until it becomes available or until the
predefined count expires. To be safe, we cache the information from the device
and compare against it when we re-open. This way we ensure that if the
topology changes under us, we don't open a completely different device. If a
device has changed, we disable it.

Adds option "ReopenAttempts" <int>
2008-09-04 18:33:39 +09:30
Peter Hutterer
4509ec1daf Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation. 2008-09-04 18:22:56 +09:30
Peter Hutterer
a205dfc091 Shut up "unused variable" compiler warnings.
Hide properties behind ifdefs, fake use of "val".
2008-09-04 18:14:48 +09:30
Peter Hutterer
184206e717 Wheel emulation: initial values must be char.
parsing int* to char* in XIChangeDeviceProperty means we lose values.
2008-08-25 17:24:15 +09:30
Peter Hutterer
79ff677c52 Init all emulateWheel values, even if EmulateWheel is disabled.
Even if we don't want EmulateWheel, we can at least init everything to usable
values. This way we only need to toggle "enabled", rather than initialising
the whole lot before usage.
2008-08-22 09:04:33 +09:30
Dan Nicholson
37e3addf89 Add wheel timeout property support
Copied from the wheel inertia property support.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-08-22 09:04:16 +09:30
Dan Nicholson
e237de0dea Add timeout support for mouse wheel emulation
Support the EmulateWheelTimeout option as the mouse driver does.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-08-22 08:41:14 +09:30
Peter Hutterer
92c6611b6f Add property support for drag lock. 2008-08-18 13:44:02 +09:30
Chris Salch
bd405ddc83 Adding in DragLockButtons functionality.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-08-18 12:03:07 +09:30