summaryrefslogtreecommitdiff
path: root/Xi
AgeCommit message (Collapse)AuthorFilesLines
2009-05-08Xi: don't double-swap the XListDeviceProperties reply.Peter Hutterer1-7/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 50cc8adafca4ba3838d468278d6eb8a4692d2488) Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08Xi: fix copy/paste error causing sizeof against wrong struct.Peter Hutterer1-1/+1
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>
2009-05-08Xi: don't send XKB mapping notifications when XKB is disabledPierre Ossman1-1/+2
Signed-off-by: Pierre Ossman <pierre@ossman.eu> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-03-27Xi: don't crash on a NULL property name, just return None.Peter Hutterer1-0/+6
strcmp doesn't like NULL-pointers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4)
2009-03-27Xi: add XATOM_FLOAT to server-defined properties.Peter Hutterer1-1/+54
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)
2009-03-27Xi: add XIPropToInt() auxiliary function.Peter Hutterer1-0/+68
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)
2009-01-30Don't release grabs unless all buttons are upThomas Jaeger1-1/+1
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>
2009-01-30Count the number of logically down buttons in buttonsDownThomas Jaeger1-4/+4
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)
2009-01-30Xi: fix use of button->down - bitflags instead of int arrays.Peter Hutterer2-9/+4
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)
2009-01-12mi: force CopyKeyClass for key events. (#19048)Peter Hutterer1-1/+1
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>
2008-12-16Xi: silence compiler warningPeter Hutterer1-1/+1
Don't mix declarations and statements. (cherry picked from commit fb2a8d0e59a3d187255538f6add22ec67551507a)
2008-12-16Xi: don't update VCP's valuators from DeviceValuator events #18882Peter Hutterer1-2/+6
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>
2008-12-09Xi: XIGetDevice needs to ignore the MORE_EVENTS flag.Tom Jaeger1-1/+1
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>
2008-12-09Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandlerPeter Hutterer1-1/+1
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>
2008-12-01Require inputproto 1.5Peter Hutterer1-2/+2
Also claim to now support XI 1.5. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-01Xi: Purge XGE remainders, we don't have any XGE events anymore.Peter Hutterer1-37/+0
2008-12-01input: don't switch MDs' classes around between SDs.Peter Hutterer2-97/+0
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.
2008-12-01dix: No DeviceEnterLeave events in server 1.6Peter Hutterer2-45/+0
2008-12-01Xi: don't allow VCP/VCK be OpenDevice'd, but allow all SDs.Peter Hutterer1-9/+2
Reverting to traditional XI behaviour.
2008-12-01Xi: don't list attachment in ListInputDevices, but list all SDs.Peter Hutterer1-34/+0
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>
2008-12-01Xi: remove the GetExtensionVersion hack - don't reply with supported version.Peter Hutterer1-13/+0
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>
2008-12-01Xi: remove all new XI2 protocol requests and their handling.Peter Hutterer18-1646/+4
This commit reverts to XI 1.4 requests, plus the input device property requests. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04xkb: extract the correct device in XkbFilterEvents.Peter Hutterer1-0/+32
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.
2008-11-04Purge device-based WindowAccess code.Peter Hutterer6-374/+8
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.
2008-10-31Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h.Peter Hutterer1-1/+0
2008-10-31Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency.Peter Hutterer2-8/+8
2008-10-26Nuke unused variablesJulien Cristau1-1/+0
2008-10-13Xi: check all handlers before applying property changes.Peter Hutterer1-12/+22
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.
2008-10-10Xi: don't memcpy the KeyClassRec from SD to MD. #16167Peter Hutterer1-2/+0
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>
2008-10-06Loader: Unexport a handful of consumerless symbols from dixsym.Adam Jackson1-1/+1
2008-10-06xalloc+bzero -> xcallocAdam Jackson1-5/+2
2008-09-26Push server-known properties into xserver-properties.h.Peter Hutterer1-0/+1
2008-09-26Xi: add "deletable" flag to properties, add DeleteProperty handler.Peter Hutterer1-1/+35
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.
2008-09-26Xi: allow Set/GetProperties to return a status, and honour this status code.Peter Hutterer1-22/+41
If a property handler now bails out, return the error code to the caller. This allows to be slightly more specific with the errors.
2008-09-26Xi: remove configure/query device property calls.Peter Hutterer3-277/+69
This removes all the meta-information about device properties (pending, fromClient, range, valid_values, immutable).
2008-09-19Xi: don't include client-side headers.Peter Hutterer1-1/+0
Spotted by Mikhail Gusarov.
2008-09-18Xi: remove broken SDeviceEnterNotifyEvent, replace with ...Leave...Peter Hutterer1-11/+1
The event format is the same for both (bar the type), so one is enough.
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky1-1/+2
TODO: static indices can be made just an int; some indices can be combined.
2008-08-22Xi: don't include .c files.Peter Hutterer1-2/+1
2008-08-22Xi: swap devices property replies.Peter Hutterer3-0/+55
2008-08-15Backport device properties to XI 1.5 instead of XI 2.0Peter Hutterer3-59/+72
2008-08-14Xi: byte-swap device property requests.Peter Hutterer1-12/+32
2008-08-12Xi: return the state from the correct keyboard in QueryDevicePointer.Peter Hutterer1-2/+4
2008-07-29Xi: ChangeDeviceControl presence events should set the appropriate devchange.Peter Hutterer1-1/+1
Requires inputproto 1.4.4 or higher.
2008-07-24Shape extension is built-in and mandatory.Adam Jackson1-2/+0
2008-07-13Xi: expose Enable/DisableDevice through XI_PROP_ENABLED property.Peter Hutterer3-0/+50
2008-07-13Xi: protect against NULL handlers, don't try to dereference.Peter Hutterer1-2/+4
2008-07-13Xi: remove ChangeDeviceControl for CoreCtl.Peter Hutterer1-14/+3
If you want to set a device to core, attach it to a master device.
2008-07-13Xi: GetDeviceProperty reply includes deviceid.Peter Hutterer1-0/+1
2008-07-10Xi: pack the property stuff into a struct, make handlers a linked list.Peter Hutterer1-38/+116
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.