Age | Commit message (Collapse) | Author | Files | Lines |
|
In order to give NewInputDeviceRequest more information, a new
InputAttributes type is introduced. Currently, this collects the product
and vendor name, device path, and sets booleans for attributes such as
having keys and/or a pointer. Only the HAL backend fills in the
attributes, though.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
|
|
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>
|
|
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>
|
|
Commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 introduced cleanup code to
remove the accel properties when switching schemes. The same code is
triggered by the default closedown code but only after unconditionally
removing all device properties (as part of the cleanup). The properties,
although deleted never got reset to NULL.
X.Org Bug 25374 <http://bugs.freedesktop.org/show_bug.cgi?id=25374>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Andy Furniss <lists@andyfurniss.entadsl.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
Trying to unregister property handlers during the device closure process
leads to invalid memory accesses.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Deleting a property that was not set on a device leads to a null-pointer
reference. The protocol allows deleting those properties - it has to be a
noop.
Reproducible:
xinput --set-prop "My device" --type=int --format=8 "my property" 1
xinput --delete-prop "My other device" "my property"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Instead of returning BadAccess when "read" permission is denied
on a device, falsify the device state (buttons down, keys pressed).
This is nicer to applications, but may still have undesired side
effects. The long-term solution is not to use these requests in
event-driven code!
Requests affected: QueryPointer, QueryKeymap, XiQueryDevice.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
(cherry picked from commit 6d436e17a9ae7f4ce8537f3fabc052d4f07ca75f)
|
|
(cherry picked from commit 85d6402354cdf143c6490f2725744c2f08b5605b)
|
|
Subpixel data in data_frac is stored as FP32.32, hence we need to get that
down again before adding it to the current value.
Reported-by: Thomas Jaeger
Tested-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The length field needs to include the bytes required for the valuators
(INT32) as well.
The reply length has the right value and since the valuator state is always
last, clients didn't notice the wrong offset.
Tested-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
To avoid confusion, the member names are now postfixed with _event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
For core and XI1 events, store the key_repeat flag in the sequence number
until TryClientEvents. The sequenceNumber is unset until TryClientEvents.
[Also thrown in, some random indentation changes. Thanks]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Adding missing dix-config.h include, adding one missing header guard.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The only failure point can be a BadAlloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The pointer advanced 12 bytes too short. Rather unfortunate if both the code
and the test have the same bug.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Bits above XI2LASTEVENT are invalid and cause in BadValues. These checks
must be performed anywhere where a mask_len parameter is given.
This patch also adds the missing checks to grab masks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
A grab mask provided in the request may be larger than the one used in the
server. Cut down to size before memcopying.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Fixes crash if the first XISelectEvents has a zero sized event mask.
Fixes crash if the mask provided is larger than others->xi2mask[].
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
masks can be of arbitrary length. If the client did not initialize mask_len,
some sort of boundary check is needed to avoid running over memory.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
A missing break meant that ButtonPress would fall through into
ButtonRelease, but luckily it appears to have been completely harmless.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
GrabKey and GrabButton are only called from XI/XI2 code. Set type to -1,
just in case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This patch corrects a misnaming of XTest-related functions.
The extension itself announces itself as XTEST. Xtst is the library name
itself, but all library functions are prefixed by XTest. Same with the
naming in the server.
- Rename all *Xtst* functions to *XTest* for consistency with the library
and in-server API.
- Rename the "Xtst device" property to "XTEST device" for consistency with
the extension naming.
- Rename the device naming to "<master device name> XTEST device". The
default xtest devices become "Virtual core XTEST pointer" and "Virtual
core XTEST keyboard".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
requires inputproto 1.9.99.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The extern declaration in xichangehierarchy.c was broken anyway.
This fixes a crash on creating a new master device.
Reported-by: Maxim Levitsky
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
buttons_size is necessary as WriteToClient swaps the buttons_len field,
resulting in the wrong number of bytes being written later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
DCEs are now processed when sent throught the master device, not when sent
through the slave device. This includes a removal of some un-used (or partly
used) fields in the DCE itself to something more self-explanatory.
TODO: if a device has events queued and its attachment is changed, the DCE
is silently dropped now. Instead, it should be generated as soon as the
first event after the attachment is sent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The version in eventconvert.c was half broken and for some reason we ended
up with a second version in exevents.c (which works). Move it over to where
it belongs and call EventToXI2 instad of having a custom function for it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If a new device posts an event while the DCE is in the queue, getting the
data from the device may result in invalid memory access.
X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Unlike Enter/Leave events generated by a device pushing the pointer around,
a device doesn't change focus all by itself. It's a result of a
SetInputFocus call, a window becoming unviewable or a grab activating. As
such, the sourceid for focus events is always the deviceid itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Use enum EventType instead of ints. This requires a load of default
cases in various switch statements to silence compiler warnings.
Reported-by: Aaron Plattner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
XI1 only uses 7 bits for deviceids, bit 8 is used for the MORE_EVENTS flag
on the wire (when DeviceValuator events are required).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
InternalEvents shouldn't be used anywhere outside the X server itself. Split
up into events.h for opaque typedefs for the events needed by various
headers and eventstr.h for the actual struct definitions.
eventstr.h must only be included by code that requires internal events and
is not part of the SDK.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Keysym grabs are tricky in the details, keycode grabs are known to work. So
for now, provide keycode grabs only.
Requires inputproto 1.9.99.15.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|