summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-02test: input - set all touch events at oncexi2.1-new-stableChase Douglas1-0/+48
Clients can't select for the three touch events individually, so ensure the test doesn't try to do so. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-02Input: Add initial multitouch support from Xi 2.1Chase Douglas20-49/+722
Xi 2.1 adds TouchClasses to devices, as well as TouchBegin, TouchMotion and TouchEnd events, to allow support for multiple touchpoints on a single device. This is missing support for any type of grabbing. Based on an initial patch by Daniel Stone. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Reorder AxisInfo elementsChase Douglas1-2/+2
Reorder elements so they can be uniform with the upcoming TouchAxisInfo elements required for coordinate scaling. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Make EventIsDeliverable non-staticChase Douglas2-12/+13
Will be used outside dix/events.c in proceeding XI 2.1 MT changes. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Make XYToWindow non-staticChase Douglas2-7/+2
Will be used outside dix/events.c in proceeding XI 2.1 MT changes. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Input: Pass sprite instead of device to XYToWindowDaniel Stone1-7/+5
XYToWindow calculates the position of the cursor and updates the sprite trace, but does nothing else with the device. Pass a SpritePtr instead so we can update an alternate focus instead of hardcoding the device's sprite. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Input: Pass sprite instead of device to FixUpEventFromWindowDaniel Stone4-26/+27
Since FixUpEventFromWindow only uses the sprite trace to determine the window stack, pass in a sprite instead of hardcoding the device sprite, so we can deliver to windows other than the one currently containing the sprite. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-12-02Export all valuator_mask_* functionsChase Douglas2-9/+7
Input drivers may use valuator masks for internal state. Having all the valuator_mask_* functions available will help. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Fix transformAbsoluteChase Douglas1-4/+8
transformAbsolute must use old values if valuator mask doesn't have new ones, and it must only set new values if there was a change. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Fix GPE Y axis scalingChase Douglas1-1/+1
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: fix typo in setting valuator modes (#21548)Peter Hutterer1-1/+1
X.Org Bug 31548 <http://bugs.freedesktop.org/show_bug.cgi?id=31548> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Cyril Brulebois <kibi@debian.org>
2010-12-02Re-export xf86CollectInputOptions.Peter Hutterer1-1/+1
Some drivers, most notably the mouse driver need this and reimplementing on the driver side doesn't make sense. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-02test: valuator_mode tests.Peter Hutterer1-0/+33
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Convert some leftover axes->mode access to valuator_get_mode()Peter Hutterer2-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02input: remove "mode" field from ValuatorClassRec.Peter Hutterer7-9/+9
We have per-axis mode now. For those bits that still need it (XI 1.x), assume that the first axis holds the device's mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02input: move proximity state into ProximityClassRec.Peter Hutterer4-5/+12
Previously the OutOfProximity bit in the valuator mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dmx: clarify a valuator mode condition.Peter Hutterer1-1/+1
Relative is defined as 0, so change the condition to be more obvious. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: clip absolute axes depending on their mode.Peter Hutterer1-3/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: populate motion history only if the mode matches the first axis.Peter Hutterer1-4/+2
XI1 doesn't cater for mixed mode devices, so bail out on the first valuator that has a different mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02input: add valuator_get_mode() helper.Peter Hutterer2-0/+26
Returns the mode of the specified valuator. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: send proximity events if one or more axes are Absolute.Peter Hutterer1-4/+8
We only skip relative events for proximity, not absolute ones. Now with mixed mode, just unset those axes that are relative. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Add support for per-axis valuator modes (Relative/Absolute)Chase Douglas12-30/+56
The XI2 protocol supports per-axis modes, but the server so far does not. This change adds support in the server. A complication is the fact that XI1 does not support per-axis modes. The solution provided here is to set a per-device mode that defines the mode of at least the first two valuators (X and Y). Note that initializing the first two axes to a different mode than the device mode will fail. For XI1 events, any axes following the first two that have the same mode will be sent to clients, up to the first axis that has a different mode. Thus, if a device has relative, then absolute, then relative mode axes, only the first block of relative axes will be sent over XI1. Since the XI2 protocol supports per-axis modes, all axes are sent to the client. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02test: valuator_mask tests.Peter Hutterer1-0/+77
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: remove valuator_mask_copy_valuators, not needed anymore.Peter Hutterer2-26/+0
With the switch to masks internally, this isn't needed anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02xfree86: convert xf86Post{Motion|Key|Button|Proximity}Event to masksPeter Hutterer1-18/+18
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02dix: get rid of the now-superfluous valuator arrays in GPE and friends.Peter Hutterer1-60/+58
The valuators are stored inside the mask, use it from there. are stored inside the mask, use it from there. are stored inside the mask, use it from there. are stored inside the mask, use it from there. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Abstract valuator masks through a set of APIs.Peter Hutterer15-186/+493
This commit introduces an abstraction API for handling masked valuators. The intent is that drivers just allocate a mask, set the data and pass the mask to the server. The actual storage type of the mask is hidden from the drivers. The new calls for drivers are: valuator_mask_new() /* to allocate a valuator mask */ valuator_mask_zero() /* to reset a mask to zero */ valuator_mask_set() /* to set a valuator value */ The new interface to the server is xf86PostMotionEventM() xf86PostButtonEventM() xf86PostKeyboardEventM() xf86PostProximityEventM() all taking a mask instead of the valuator array. The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to memory allocation restrictions in SIGIO handlers. For easier review, a lot of the code still uses separate valuator arrays. This will be fixed in a later patch. This patch was initially written by Chase Douglas. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02Add CountBits() to the server.Chase Douglas2-0/+14
Function to count the number of bits set in the given array. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-02xfree86: Remove unused refcounting from input driversChase Douglas3-6/+0
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-02xfree86: add xf86OptionListDuplicate()Peter Hutterer2-0/+20
Does what it says on the box. Some drivers need to duplicate option lists from the original device to ensure that devices created by the driver (driver-internal hotplugging) have the same list of options as the original device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: add a hook to replace the new console handler.Peter Hutterer3-3/+22
This hook is only necessary for the keyboard driver to remove the race condition between drain_console() and the driver's ReadInput (Bug 29969). The idea is that a driver that needs to handle events from the console calls xf86ReplaceConsoleHandler() with it's own ReadInput (or NULL) and thus removes the drain_console call. It's the driver's responsibility to restore the previous behaviour when the driver is unloaded. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> CC: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-12-02xfree86: move XI_VERIFY_VALUATORS to the source file it's used in.Peter Hutterer2-8/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: remove TS_Raw and TS_Scaled defines.Peter Hutterer1-4/+0
There are no references to it other than the commit that added them. But since we're re-doing the API anyway, now is a good time to break things. commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 00:18:24 2007 +0200 XFree86 input: Add backwards compatibility for motion history Add the old motion history API back, as a shim around the new mi API. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: remove {Dont}SendCoreEvents definesPeter Hutterer1-5/+0
The input drivers that use it only do so with ABI 0 and we're long past this one now. Input driver don't have a say in whether they send core events now anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: don't export xf86InputDevs.Peter Hutterer1-1/+1
Use xf86FirstLocalDevice() instead (but don't get me started on the naming of that one...) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: remove XI_PRIVATE macro, unused.Peter Hutterer1-3/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: update comment for xf86DeleteInputPeter Hutterer1-3/+1
We have a driver hook - it's UnInit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: remove IDevRec, replace with InputInfoRec.Peter Hutterer6-150/+113
This struct is superfluous, maintaining the same info as the InputInfoRec (with the exception of the driver name). This is a rather large commit with the majority of changes being a rename from the fields of the IDevRec (idev, commonOptions) to the InputInfoRec (pInfo, options). The actual changes affect the initialization process of the input device: In NewInputDeviceRequest, the InputInfoRec is now always allocated and just added to the internal list in xf86NewInputDevice() if the init process succeeded. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: plug minor memory leak.Peter Hutterer1-1/+2
When no identifier for the device was specified, the allocated IDevRec (and its associated fields) need to be freed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: Remove extraOptions parameter from xf86CollectInputOptions.Peter Hutterer3-15/+3
And unexport it, drivers don't need to call this in the new init process. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: remove extraOptions field from IDevRec.Peter Hutterer3-37/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: remove some ifdef 0 code.Peter Hutterer1-6/+0
InputInfoRec hasn't had a free function pointer since the git import. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: move a declaration down to the block it is used in.Peter Hutterer1-3/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: minor comment fix. HAL → config backendPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: skip a few NULL initialization, calloc does it for us.Peter Hutterer1-6/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02xfree86: remove conversion procs and close proc from InputInfoRec.Peter Hutterer2-11/+0
None of them are called by the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-02Remove atom field from InputInfoRec.Peter Hutterer2-3/+3
This field was only used in one location where we can use a local variable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02input: constify valuators passed in by input drivers.Peter Hutterer4-14/+14
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-02xfree86: Purge kbdCustomKeycodes from xf86Info.Jesse Adkins2-2/+0
This was obsolete after 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 "bug #890: completely remove deprecated keyboard driver". Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-02xfree86: remove history_sizePeter Hutterer2-5/+0
For a couple of ABIs now the history size was essentially static anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>