Age | Commit message (Collapse) | Author | Files | Lines |
|
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
(cherry picked from commit f8dd80d13bb5313a11b38b280f8ad3e22f0a6300)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 50cc8adafca4ba3838d468278d6eb8a4692d2488)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This wrong check may cause BadLength to be returned to the client even if the
length is correct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8b583ca2b21155359c6255f406c96599b277c762)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
strcmp doesn't like NULL-pointers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4)
|
|
This property is used to denote type float for input properties. Such
properties can be accessed easily through the XIPropToFloat() function.
Code originally written by Simon Thum.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit a48c81dcdf569a3f634ac23e08d2491354de6a36)
|
|
Converts an XIPropertyValuePtr to an integer, provided that type and format is
right.
Code originally written by Simon Thum.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit 669f6810af9a89187d6149841925fe765f3988ff)
|
|
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.
|
|
|