summaryrefslogtreecommitdiff
path: root/Xi/extinit.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-23Fix gcc -Wwrite-strings warnings in various extensionsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-21Use internal temp variable for swap macrosMatt Turner1-131/+107
Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-04-24Xi: remove duplicated includesNicolas Kaiser1-2/+0
Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-04-18Xi: fix reply swapping function check for XIPassiveGrabDevicePeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-02Xi: add XI_Focus{In,Out} to swapped events.Matthieu Herrb1-0/+2
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-04-02Xi: take XI2 requests into account also for the swapping case.Matthieu Herrb1-2/+3
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-03-08xi: Use RESTYPE consistentlyAdam Jackson1-1/+1
No functional change Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-06Input: Swap flags in DeviceEventsDaniel Stone1-0/+1
Swap flags for different-endian clients when delivering XI2 DeviceEvents. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-11-12Xi: move property reset from extension shutdown to init.Peter Hutterer1-2/+2
If any part of the stack calls XIGetKnownProperty during device shutdown the property is re-initialized before the server generation resets, leaving the value invalid again. Move the reset to the extension init which happens before input devices are initialized before the first property is requested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-08-27Replace malloc/strlen/strcpy with strdup.Matt Turner1-2/+1
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard1-4/+2
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-1/+1
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-05-07Xi: reset the known properties at the end of the server generation.Peter Hutterer1-0/+1
Properties allocated through XIGetKnownProperty() aren't reset on the second server generation but keep the old value. As a result, wrong Atoms are supplied to the driver, resulting in potential data corruption or weird error message. Reproducible by running "xlsatom | grep FLOAT" twice on a plain X server. The second X server generation won't have the FLOAT atom defined anymore, despite the users of this atom not noticing any errors. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-3/+2
Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Check for failures from CreateNewResourceTypeAlan Coopersmith1-0/+2
Make sure to check return value before setting bitmask flags. For most calls, just fails to init the extension. Since Xinput already calls FatalError() on initialization failure, so does failure to allocate Xinput's resource type. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-09-21input: define server-supported protocol versions in one single file.Peter Hutterer1-5/+5
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: RĂ©mi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-01Input: Mark Xi input events as criticalDaniel Stone1-0/+5
Note that the Xi events are critical and should thus cause a flush to the client when an input event is pending. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-08-24Xi: add swapping hook for XIGetFocus reply.Peter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xi: fix up broken DeviceChangedEvent swapping codePeter Hutterer1-13/+20
2009-08-13Xi: add event swapping for XIRawEvents.Peter Hutterer1-0/+49
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xi: fix event swapping for XIDeviceEvents.Peter Hutterer1-5/+13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xi: un-statify XI2EventSwap, it is needed for tests.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18Xi: valuator/button labels are called labels now, not 'names'Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17Xi: namespace XI2 files.Peter Hutterer1-8/+8
Some files (notably those merged with MPX before XI2 came along) didn't use a 'xi' prefix. This patch changes all of them to meaningful names. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11Xi: rename ProcXISelectEvent to ProcXISelectEvents.Peter Hutterer1-2/+2
The request name has the plural, so let's do it here too. Purely cosmetic change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-09Xi: hierarchy events have a num_info now instead of num_devices.Peter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-05Xi: add XIQueryVersion reply swapping hook.Peter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-02input: add support for XIAllDevices and XIAllMasterDevices passive grabs.Peter Hutterer1-0/+14
These grabs are suported through two fake devices inputInfo.all_devices and inputInfo.all_master_devices. These devices are not part of the device list and are only initialised for their device id, nothing else. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-25Xi: add request processing for XIGetSelectedEvents.Peter Hutterer1-2/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-21input: rename device->type to device->xinput_type.Peter Hutterer1-1/+1
This type is only used in XI to give a hint of what type this device may be. Call it xinput_type for clarity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-20Xi: remove DeviceIsPointerTypePeter Hutterer1-15/+0
This approach is broken anyway. DIPT only checked for the XInput type "MOUSE" and the only user of this is xf86ActivateDevice when it sets the Activate/DeactivateGrab functions. Since synaptics and wacom set their own types, evdev only sets MOUSE for, well, mice half the devices didn't have this set correctly anyway. Instead, ActivatePointerGrab should be merged together with ActivateKeyboardGrab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16Update to new XI2 namesPeter Hutterer1-19/+17
2009-05-08Xi: Add XI2 property requests.Peter Hutterer1-2/+30
2009-05-08Xi: add missing break in XI event swapping functionPeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-06Xi: add GrabButton and GrabKeysym code.Peter Hutterer1-2/+9
We don't do keycode grabs in XI2, they're pointless.
2009-04-19Convert to using int32_t fixed point values on the wire.Peter Hutterer1-16/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19Xi: add support for XIAllowEvents.Peter Hutterer1-2/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19Xi: Add support for XI2 active grabs and ungrabs.Peter Hutterer1-2/+9
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19Xi: take XI2 requests into account when checking opcodes.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20Xi: purge old device enter/leave masks.Peter Hutterer1-14/+0
2009-03-20Add Get/SetDeviceFocus handling.Peter Hutterer1-2/+7
2009-03-20Xi: Deliver XI2 HierarchyEvents when the hierarchy changes.Peter Hutterer1-0/+29
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20dix: deliver device enter/leave events.Peter Hutterer1-0/+4
2009-03-20Add XI2 masks and XISelectEvent() request handling.Peter Hutterer1-3/+3
XI2 event masks are simply stored in the OtherEventMasks as a separate field. This replaces the XiSelectEvent code.
2009-03-20Xi: Change ChangeMasterDeviceClasses to new XI2 events.Peter Hutterer1-20/+89
Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that assembles the XI2 wire event for the DeviceChanged event. Re-use this when detaching the last SD. Not quite perfect yet, we still copy the device classes from the slave now rather than from the data we had when the event occured. But it's a start. (We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20dix: fix up device enter/leave for XI_Enter/XI_Leave.Peter Hutterer1-11/+20
2009-03-20Xi: add XIQueryDevice request handling.Peter Hutterer1-2/+7
2009-03-20Xi: name-space and fix XI2 requestsPeter Hutterer1-17/+18
All XI2 requests have XI prefixes. Requests affected: ChangeDeviceCursor QueryDevicePointer WarpDevicePointer SetClientPointer GetClientPointer XIChangeDeviceHierarchy.
2009-03-20Xi: add XIQueryVersion request handling.Peter Hutterer1-2/+5
2009-03-20Xi: purge ExtendedGrabDevice request handling.Peter Hutterer1-7/+2