summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-10-08Add multitouch support from Xi 2.1HEADxi2.1Daniel Stone3-1/+185
Add support to libXi for all the Xi 2.1 additions to the spec: TouchClass, TouchBegin, TouchEnd and TouchMotion, as well as touch grabs. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-10-06Purge cvs tags.Jesse Adkins1-2/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-07Fix typo when converting raw events from the wire.Carlos Garnacho1-1/+1
The raw values were being miscalculated, containing only the integral part of the FP3232, meanwhile normal valuators were mistakenly added the fractional part of its corresponding raw value. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-26Fix build with gcc 2.95Matthieu Herrb1-1/+1
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-13Always unlock display correctlyPauli Nieminen1-18/+15
XISelectEvents and XIGetSelectedEvents were not unlocking display in all return paths. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
2010-07-13Use single error path in XGetDeviceControlPauli Nieminen1-14/+9
This reduces code duplication and fixes possible leak of d. d would leak if allocation of Device fails. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-07-13Use single error path in XGetFeedbackControlPauli Nieminen1-14/+9
This reduces code duplication and fixes possible leak of f. f would leak if allocation of Feedback fails. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-07-13Use single error path in XQueryDeviceStatePauli Nieminen1-15/+9
This reduces code duplication and fixes possible leak of data. data would leak if allocation of state fails. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-07-13Fix memory leak in XIGetSelectedEventsPauli Nieminen1-0/+2
mask_in was leaking for every successfull XIGetSelectedEvents. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-07-13Fix usage of uninitialized valuePauli Nieminen1-0/+1
In error case length of extra data could be uninitialized. This would result randomly sized request later in function. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-07-08Purge macros NEED_EVENTS and NEED_REPLIESFernando Carrijo4-8/+0
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-09Don't unlock the Display twice.Jamey Sharp1-1/+0
_xiQueryVersion's caller must wrap it in a LockDisplay/UnlockDisplay pair, so it shouldn't call UnlockDisplay itself. Signed-off-by: Jamey Sharp <jamey@minilop.net>
2010-02-22Initialize extension with the right number of events.Peter Hutterer3-11/+82
If the server supports a lower XI version than the client, the Xlib-internal event vector may be smashed. See libXext for more details. http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=83fdb27df4ddc2fb088ddf2ec65f0db6b7c57287 This patch queries the server for the supported XI extension before registering the extension with Xlib. The number of events registered depends on the server version. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-02-20config: move CWARNFLAGS from configure.ac to Makefile.amGaetan Nadon1-1/+2
Compiler warning flags should be explicitly set in the makefile rather than being merged with other packages compiler flags. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-09-29Don't export sizeDeviceClassType, size_classes and copy_classesJulien Cristau1-5/+3
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-09-24XQueryDeviceState: correct length of XValuatorStatePeter Hutterer1-1/+2
The length is suppposed to be the complete class size, not just the struct size. Since XValuatorState is followed by multiple valuator values the size of the class is variable and dependent on the number of valuators. The server assembles the valuator state last. This bug is unlikely to affect clients as they should never go past the last class anyway. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-07mask_len in XIGrabDevice is in 4-byte units (#23708)Peter Hutterer1-2/+2
X.Org Bug 23708 <http://bugs.freedesktop.org/show_bug.cgi?id=23708> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-01Initialize send_event for cookie events. (#23609)Peter Hutterer1-0/+6
X.Org Bug 23609 <http://bugs.freedesktop.org/show_bug.cgi?id=23609>
2009-08-24Update XIWarpPointer to take doubles (inputproto >= 1.9.99.902)Peter Hutterer1-8/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05Update library version for new symbols.Peter Hutterer1-1/+1
XI2 adds a whole lot of new symbols but leaves the existing ones. Minor bump only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-04Remove leftover RCS tags.Peter Hutterer1-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22Replace keysym grabs with keycode grabs.Peter Hutterer1-4/+4
Keysym grabs are tricky to get right for applications that are more complicated than demo applications. otoh, we know keycode grabs are working. So let's go with keycode grabs for now and add keysym grabs later when we've sorted out the details. Requires inputproto 1.9.99.15 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15Fix wrong raw_valuator wire copy, add fractional parts.Peter Hutterer1-1/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Add flags to XIDeviceEvent and XIRawEvent.Daniel Stone1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Cater for new event-specific raw event types.Peter Hutterer1-3/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Fix broken formatting, remove empty comment.Peter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Add the deviceid to XI2 property events.Peter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Plug memory leak in XIHierarchyEvent copy.Peter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-13Fix segfault in XIDeviceChangedEvent wire parsing.Peter Hutterer1-0/+2
Introduced by 225071e2e67fb65a0258397212f9826c9b25e078. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12Add event copying for raw events.Peter Hutterer1-0/+38
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12Switch to new XIEvent structures - no need for pointers anymore.Peter Hutterer1-109/+70
This removes all those pointers from event structures that were just there due to the pre-cookie struct size limit. Pointers remaining are only those that are of variable length (e.g. masks and valuator states). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12Remove XIFreeEventData - obsolete with cookie events.Peter Hutterer2-71/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-12Add effective modifiers/group to events - require inputproto 1.9.99.13Peter Hutterer1-0/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-08Split copy_classes and size_classes to avoid memory leakPeter Hutterer2-15/+26
The switch to cookie events introduced a memory leak in XIDeviceChangedEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-08Use cookie events for XI2 events.Peter Hutterer2-260/+673
Instead of squashing the events directly into the XEvent use the new libX11 cookie events. This allows us to have larger events without the 96 byte restriction. Requires libX11 1.2.99.1 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-08Add next_block() call to advance pointers over memory.Peter Hutterer1-0/+37
Simple call to get the pointer to the next field when operating on a wire protocol struct or on a single-memory-block Xlib structure. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17Axis and button labels should be called labels, not names.Peter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-16Protect button label copying against 64-bit Atom madness.Peter Hutterer1-2/+3
Datatype Atom is 8 bytes on 64 bit architectures, but it's always 4 bytes on the wire. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-16Include the current valuator state in XIQueryDevice.Peter Hutterer1-0/+1
2009-06-16XIButtonClass now includes a XIButtonState struct.Peter Hutterer1-2/+11
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-12Add sourceid to device classes.Peter Hutterer1-0/+1
2009-06-12XISelectEvents and XIGetSelectedEvents use "win" now instead of "window"Peter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09XIHierarchyEvent should list num_info, not num_devices.Peter Hutterer1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09Rename XICreateMaster to XIAddMaster for consistency.Peter Hutterer1-7/+7
add/remove is used for slave devices and for flags, so we should use it in XIChangeHierarchy as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09Silence warning: missing prototype for copy_classesPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09Remove CamelCase use from XIChangeHierarchy.Peter Hutterer1-5/+5
Everything else uses underscore notation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09Hierarchy changes should use "deviceid", not device.Peter Hutterer1-3/+3
Every other call/interface uses deviceid, so change for consistency. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-02Fix typo in Makefile.am, leading to the XI2 source skipping compilation.Peter Hutterer1-1/+1
Introduced with 59dc570e6ad4adab8066c7b8d2bff77cbf70bed4. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-02Rename remaining XI2 sources to XI<foobar>.cPeter Hutterer7-61/+22
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-02Return BadRequest from XIQueryVersion if XI2 isn't supported.Peter Hutterer3-7/+25
XIQueryVersion (like all other calls) makes sure XGetExtensionVersion is called beforehand anyway. So if that doesn't match 2.0 or higher, return BadRquest before issuing the real request (which would trigger a BadRequest error). This way, clients can use XIQueryVersion without having to set up the error handler. XIQueryVersion is now guaranteed to return the server-supported version. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>