Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously, only buttons <= 5 would count here, but the core protocol
allows for 255 buttons.
http://lists.freedesktop.org/archives/xorg/2009-January/042092.html
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 717a961528ec69a6e630d536e15568670e0b398a)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This fixes the following bug. Assuming your window manager grabs
Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping,
then press the physical button 3 (this shouldn't have any effect), press
Alt and then button 1. The press event is delivered to the application
instead of firing the grab.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f7f85f696570541e2dd43462675de9e6ee46f545)
|
|
The device's button down state array was changed to use DOWN_LENGTH and thus
bitflags for each button in cfcb3da7.
Update the DBSN events to copy this bit-wise state.
Update xkb and Xi to check for the bit flag instead of the array value.
Reported by ajax.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a)
|
|
While we don't want to copy all other device classes into the VCK, we need to
copy the key class to transfer the layout from the SDs into the VCK.
This resembles the functionality of SwitchCoreKeyboard in server 1.5.
Thanks to Colin Guthrie for providing the follow-up patch (#19222)
X.Org Bug 19048 <http://bugs.freedesktop.org/show_bug.cgi?id=19048>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Don't mix declarations and statements.
(cherry picked from commit fb2a8d0e59a3d187255538f6add22ec67551507a)
|
|
The VCP doesn't need to update the valuators anyway since it cannot send XI
events. Just skip that bit.
X.Org Bug 18882 <http://bugs.freedesktop.org/show_bug.cgi?id=18882>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Reported in X.Org Bug 18882, Comment 5.
<http://bugs.freedesktop.org/show_bug.cgi?id=18882>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 78a62d7713c708d067d8824ec41b0a0225c1997f)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
CamelCase can be taken too far, and AFAICT there's no consumers of that
function yet anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Also claim to now support XI 1.5.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
|
|
Server 1.6 uses the X Input 1.x input model, where the core devices (VCP and
VCK) do not generate XI events. They don't have to swap device classes but
instead stay at the default number of classes at all times.
This means we can get rid of the DeviceClassesChangedEvents as well.
|
|
|
|
Reverting to traditional XI behaviour.
|
|
In XI2, we only list the VCP and the VCK as well as floating SDs to non-XI2
clients. This is not the case here, we just list all devices.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
XI2 abuses the GEV request to reply with the min/major version of the
supported extension if the length for the name is 0. Don't do that, yet.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
This commit reverts to XI 1.4 requests, plus the input device property
requests.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
If the event is an XI event, we need to work on the correct device, not on
the VCK.
Adds XIGetDevice(event) function to extract the device from an event.
|
|
Really, this was a bad idea. It's not security, the UI features that would
have been cool (e.g. clicking through windows) aren't implemented anyway, and
there's nothing you can't achieve just by using plain XI anyway.
Requires inputproto 1.9.99.6.
|
|
|
|
|
|
|
|
The current code exposes to inconsistent updates, i.e. if handler N succeeds
but handler N+1 fails in setting the property, an error is returned to the
client although parts of the server now behave as if the property change
succeeded.
This patch adds a "checkonly" parameter to the SetProperty handler. The
handlers are then called twice, once with checkonly set to TRUE.
On the checkonly run, handlers _MUST_ return error codes if the property
cannot be applied. Handlers are not permitted to actually apply the changes.
On the second run, handlers are permitted to apply property changes.
Errors codes returned on the second run are ignored.
|
|
Most of its component get copied during CopyKeyClass anyway.
The ones that aren't:
postdown - never changed for virtual devices anyway.
down - shouldn't change that without sending events.
memcpy'ing the struct also copied mapWidth, which means we didn't realloc
during SetKeySymsMap lateron, overwriting the memory assigned to us.
X.Org Bug 16167 <http://bugs.freedesktop.org/show_bug.cgi?id=16167>
|
|
|
|
|
|
|
|
A property can only be deleted if any of the following is true:
- if a property is deletable and all handlers return Success.
- if a property is non-deleteable and the all handlers return Success AND the
delete request does not come from a client (i.e. driver or the server).
A client can never delete a non-deletable property.
|
|
If a property handler now bails out, return the error code to the caller. This
allows to be slightly more specific with the errors.
|
|
This removes all the meta-information about device properties (pending,
fromClient, range, valid_values, immutable).
|
|
Spotted by Mikhail Gusarov.
|
|
The event format is the same for both (bar the type), so one is enough.
|
|
TODO: static indices can be made just an int; some indices
can be combined.
|
|
|
|
|
|
|
|
|
|
|
|
Requires inputproto 1.4.4 or higher.
|
|
|
|
|
|
|
|
If you want to set a device to core, attach it to a master device.
|
|
|
|
We may need more than one handler to deal with a property (e.g. one in the
driver, one in the DIX), so get the handlers into a linked list and call them
one-by-one. This is of course slightly less entertaining than the hilarious
WRAP/UNWRAP game we play in other parts of the server.
XIRegisterPropertyHandler/XIUnregisterPropertyHandler are the interface
drivers/the DIX should use to attach themselves to the device.
XIDeleteAllDeviceProperties destroys everything, including the handlers.
|
|
Basically just copied from randr properties, with minor changes only.
Each device supports arbitrary properties that can be modified by clients.
Modifications to the properties are passed to the driver (if applicable) and
can then affect the configuration of the device.
Note that device properties are limited to a specific device. A property set
on a slave device does not migrate to the master.
|
|
Note to self: don't mix up branches with half-finished cherrypicks.
This reverts commit 666838fcc8b71fdeae160844160187f345cbf4a6.
|
|
Basically just copied from randr properties, with minor changes only.
Each device supports arbitrary properties that can be modified by clients.
Modifications to the properties are passed to the driver (if applicable) and
can then affect the configuration of the device.
Note that device properties are limited to a specific device. A property set
on a slave device does not migrate to the master.
|
|
This fixes a severe issue - when the client died the event mask didn't get
unregistered and a future event would dereference dangling pointers. By
storing the event masks in the resource system we can free them when the
client dies.
|
|
Using id = 0 only worked pre-MPX since XInput didn't allow XOpenDevice for the
core devices (0 and 1). Now we can now legally register for events so we may
overwrite our device-independent classes with the ones selected for the VCP.
So, increase the EMASKSIZE to MAX_DEVICES + 1 and use MAX_DEVICES as the ID
when we don't have a device.
|
|
Mixing usage where some parts of the code treated this field as a bitmask
and other parts as an array of card8 was wrong, and as the wire protocol
wanted bitmasks, it was less invasive to switch the newer counting code use
booleans.
Master devices track slave buttons by waiting for all slave buttons to be
released before delivering the release event to the client.
This also removes the state merging code in DeepCopyDeviceClasses -- that
code was changing master device state without delivering any events,
violating protocol invariants. The result will be that existing slave
button state which does not match the master will not be visible through the
master device. Fixing this would require that we synthesize events in this
function, which seems like a bad idea. Note that keyboards have the same
issue.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
|