summaryrefslogtreecommitdiff
path: root/hw/kdrive/linux/evdev.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-26Revert "Add a "flags" field to DeleteInputDeviceRequest."Keith Packard1-2/+2
Peter wants to get a larger patch sequence put together and I didn't read past the commit message to see the 'don't take this patch please'. This reverts commit 531ff40301975519af7b20109c17d296312d3f2b.
2010-05-25Add a "flags" field to DeleteInputDeviceRequest.Peter Hutterer1-2/+2
Some input drivers need to implement an internal hotplugging scheme for dependent devices to provide multiple X devices off one kernel device file. Such dependent devices can be added with NewInputDeviceRequest() but they are not removed when the config backend calls DeleteInputDeviceRequest(), leaving the original device to clean up. Example of the wacom driver: config/udev calls NewInputDeviceRequest("stylus") wacom PreInit calls NewInputDeviceRequest("eraser") NewInputDeviceRequest("pad") NewInputDeviceRequest("cursor") PreInit finishes. When the device is removed, the config backend only calls DeleteInputDeviceRequest for "stylus". The driver needs to call DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to clean up properly. However, when the server terminates, DeleteInputDeviceRequest is called for all devices - the driver must not remove the dependent devices to avoid double-frees. There is no method for the driver to detect why a device is being removed, leading to elaborate guesswork and some amount of wishful thinking. Though the input driver's UnInit already supports flags, they are unused. This patch uses the flags to supply information where the DeleteInputDeviceRequest request originates from, allowing a driver to selectively call DeleteInputDeviceRequest when necessary. Also bumps XINPUT ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-10/+10
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-24kdrive: Bump evdev maxKeycodeMikhail Gusarov1-1/+1
There are keycodes > 193 in evdev, e.g. KEY_WIMAX which is 246 . Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@nwnk.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-01Remove trailing whitespaceMikhail Gusarov1-12/+12
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-28kdrive: Grab evdev mouse/keyboard devices when X server is activeMikhail Gusarov1-1/+14
Input events are directed to both vt and input devices by default. Unless input devices are grabbed, keyboard events fill it vt buffers and cause spontaneous wakeups in kernel tty layer when buffers are full. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-11KDrive: Warning fixes and cleanupsDaniel Stone1-11/+4
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-04-03kdrive: s/KdSaveString/strdup/gAdam Jackson1-3/+3
This isn't even funny anymore.
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-10-06xalloc+memset(0) -> xcallocAdam Jackson1-4/+2
2007-08-07Updates some piece of the dead mouse evdev code under the new hotplug scheme.Tiago Vignatti1-41/+268
I exported the evdev driver to Xephyr server. I'm running it using something like: $ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \ evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br It also closes /#5668.
2007-06-29Death to RCS tags.Adam Jackson1-2/+0
2007-06-27More janitor work. Remove 'defined but not used' warnings from kdrive and ↵Tiago Vignatti1-2/+2
some minor cosmetic.
2006-07-21new KDrive input world orderDaniel Stone1-186/+198
Convert KDrive to GPE/GKE interface. Add first-class drivers and enumerate every device separately through Xi, instead of lamely attempting to aggregate them. Add XKB support to the Linux keyboard driver. Add 'thumb button' support to the tslib driver. Rejig InitInput, so each DDX has to add a list of drivers it supports. Support NewInputDeviceRequest, et al.
2005-12-27Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.hAdam Jackson1-1/+1
2005-02-09Add initial evdev frameworkKeith Packard1-0/+299