summaryrefslogtreecommitdiff
path: root/Xi
AgeCommit message (Collapse)AuthorFilesLines
2007-12-13Merge branch 'master' into XACE-SELINUXEamon Walsh2-6/+6
Conflicts: Xext/EVI.c Xext/bigreq.c Xext/cup.c Xext/dpms.c Xext/fontcache.c Xext/mitmisc.c Xext/xcmisc.c Xext/xf86bigfont.c Xext/xtest.c configure.ac dbe/dbe.c hw/darwin/darwin.h hw/darwin/darwinEvents.c hw/darwin/iokit/xfIOKit.h hw/darwin/iokit/xfIOKitCursor.c hw/darwin/quartz/fullscreen/fullscreen.c hw/darwin/quartz/fullscreen/quartzCursor.c hw/darwin/quartz/quartz.c hw/darwin/quartz/quartzCommon.h hw/darwin/quartz/quartzCursor.c hw/darwin/quartz/xpr/dri.c hw/darwin/quartz/xpr/dristruct.h hw/darwin/quartz/xpr/xprCursor.c hw/darwin/quartz/xpr/xprFrame.c hw/xfree86/modes/xf86RandR12.c include/cursor.h miext/rootless/rootlessCommon.h miext/rootless/rootlessScreen.c miext/rootless/rootlessWindow.c render/picturestr.h Trying to pick up the pieces from the darwin churn here...
2007-12-05ProcessOtherEvent: Don't do double translation of button eventsDaniel Stone1-2/+2
We already deal with the button mapping in GetPointerEvents, so don't do the remapping again in ProcessOtherEvent.
2007-12-04dix: change the filters to be per-device.Peter Hutterer2-5/+11
If we have one global filter, one pointer may change the filter value and affect another pointer. Reproduceable effect: blackbox and xterm, start dragging xterm then click anywhere with the other pointer (attached to different masterd device!). The button release resets the filter[Motion_Filter(button)] value, thus stopping dragging and no event is sent to the client anymore. Having the filters set per device gets around this.
2007-11-27Xi: set DeviceXXXState's length fields to the correct size of the struct.Peter Hutterer1-4/+4
Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum. (cherry picked from commit 0f2398d06ce591724e388b3270800c5e22b3de2d)
2007-11-27Xi: set DeviceXXXState's length fields to the correct size of the struct.Peter Hutterer1-4/+4
Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum.
2007-11-22Xi: allocate motion history for master device.Peter Hutterer1-0/+1
We're still missing out on the actual content of the history but at least this way we don't segfault.
2007-11-22DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec.Peter Hutterer1-2/+2
We free the ValuatorClassRec quite regularly. If a SIGIO is handled while we're swapping device classes, we can bring the server down when we try to access lastx/lasty of the master device.
2007-11-21Xi: allow clients to specify pure client id in SetClientPointer.Peter Hutterer1-4/+11
If no window was found with the given ID, try if there's a client with the ID. Allows us to set the CP for apps that don't open windows (e.g. x2x).
2007-11-20registry: Remove registry code from XInput extension.Eamon Walsh1-115/+0
Moving all the names into dix/registry.c
2007-11-18Xi: add missing XI_DeviceClassesChangedMask to XI filters array.Peter Hutterer1-1/+2
2007-11-16Xi: Deep-copy full list of FeedbackClasses.Peter Hutterer1-10/+108
All feedback classes are linked lists and the whole list has to be duplicated, not just the first entry. Xkb stuff still missing.
2007-11-15Xi: Only alloc modifierKeyMap if <slave device>->maxKeysPerModifier > 0Peter Hutterer1-5/+8
Sometimes (e.g. on my debian ppc box) maxKeysPerModifier of the SD is 0. So we try to malloc(0), bringing the whole server down with a FatalError because it looks as if the malloc failed. This is bad, so only alloc if we actually have something to alloc.
2007-11-15Xi: fix up sloppy class copying causing segfaults.Peter Hutterer1-0/+5
2007-11-15dix: Add FreeDeviceClass and FreeFeedbackClass for centralised xfree.Peter Hutterer1-28/+1
Ensures that we only have one way of freeing a device class to avoid leaks in ChangeMasterDeviceClasses and other places.
2007-11-15Xi: reset xkb-stuff to NULL after copying (DeepCopyDeviceClasses)Peter Hutterer1-3/+21
Having two devices point to the same xkb stuff causes SIGABRTs. Also, don't init a MD's xkbInfo unless the SD has an xkbInfo.
2007-11-15Xi: free XkbSrvLedInfos as well when freeing an MD's device classes.Peter Hutterer1-0/+9
2007-11-15Xi: When switching MD classes, make a deep copy instead of pointer flip.Peter Hutterer1-24/+190
Turns out it's really really hard synchronising device state across multiple duplicated events if they all share the same struct. So instead of doing so, when the SD changes deep-copy all it's classes into the MD. The MD then has the same capabilities, but the state can be set separately. This should fix xkb, key state, repeat etc. problems. Updating the device state allows us to remove the SwitchCoreKeyboard from the event gathering, it's all done during event processing now.
2007-11-14Xi: toggle the public.devPrivate as well when switching device classes.Peter Hutterer1-0/+1
The master needs to have the same devPrivate as the slave, in case a client issues a request that goes down to the driver. Example: if a driver wants to ring the keyboard bell, it'll pick a keyboard. The KeyClassPtr will direct it to the matching method in the driver, but because the MD doesn't have the devPrivate set the driver segfaults. Even if all drivers were updated to not dereference the nullpointer, nothing would actually ever happen. To avoid this, we flip the master's public.devPrivate to the last SDs devPrivate.
2007-11-14Xi: Move updating the device state from POE into separate function.Peter Hutterer1-139/+219
POE now only deals with processing the event and calling the appropriate delivery methods. Actually modifying the device state is done in UpdateDeviceState. This separation should make it easier to avoid setting the state twice when master events are processed.
2007-11-13Xi: remove RegisterPairingClient handling. Deprecated with device hierarchy.Peter Hutterer4-161/+0
2007-11-13Xi: remove trailing whitespaces.Peter Hutterer19-130/+130
2007-11-12dix: When the last slave is removed, set master to the original classes.Peter Hutterer3-42/+28
DeviceClassesChangedEvent is sent to the client, where device == new slave.
2007-11-09Xi, dix: Add ability to change MD classes + send event when doing so.Peter Hutterer4-8/+129
Each time a different slave device sends through a master, an DeviceClassesChangedEvent is enqueued. When this event is processed, all classes of the matching master device are changed, and the event is sent to the clients. Next time the master is queried, it thus shows the evclasses of the last slave device. The original classes are stored in the devPrivates. TODO: if all slave devices are removed, the master's original classes need to be restored.
2007-11-09Xi: notify the clients when the device hierarchy has been changed.Peter Hutterer2-3/+12
2007-11-08Xi: return BadDevice for slave devices on ProcXSetClientPointerPeter Hutterer1-11/+9
Also clean up to return error codes instead of sending the error manually.
2007-11-08Merge branch 'mpx' into mdsdPeter Hutterer36-648/+279
Conflicts: Xi/opendev.c
2007-11-07Merge branch 'master' into mpxPeter Hutterer36-652/+281
Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c
2007-11-07Xi: don't call CheckMotion for slave devices.Peter Hutterer1-1/+2
This essentially disables enter/leave for slave devices, but re-enables them for master devices. Which is a good thing after all.
2007-11-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-2/+2
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-11-05Xi: Remove usage of allocaDaniel Stone1-2/+2
Replace with xalloc/xfree.
2007-10-19Xi: allow VCP/VCK to be OpenDevice'd as well.Peter Hutterer1-6/+0
All devices deserve to be equal. Except master devices, they are a bit more equal than the others.
2007-10-19Xi: advertise as XInput v2 capablePeter Hutterer1-2/+2
2007-10-19Xi: remove ChangePointerKeyboardPairing in favour of ChangeDeviceHierarchy.Peter Hutterer4-11/+283
2007-10-19Xi: set master device's id in ListDevices Reply.Peter Hutterer1-0/+3
2007-10-19Xi: return all master devices as type IsXPointer/Keyboard when listing devs.Peter Hutterer1-11/+2
Slave devices are reported as IsXExtensionPointer/Keyboard.
2007-10-18dix: Add client parameter to AddPassiveGrabsToList().Eamon Walsh1-2/+2
2007-10-17Xi: don't send core events for slave devices.Peter Hutterer1-1/+1
2007-10-16Fix up detritus from removing GetPairedPointer/Keyboard.Peter Hutterer2-13/+6
2007-10-15registry: Register Input extension protocol names.Eamon Walsh1-0/+117
2007-10-01Xi, xfree86: Remove leftovers of the XI wrapper code.Peter Hutterer1-54/+2
2007-09-28xace: add hooks + new access codes: XKB extension.Eamon Walsh4-6/+16
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway.
2007-09-28xace: add new hooks + access controls: XInput extension.Eamon Walsh37-173/+161
Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice.
2007-09-28Remove generation of core events, long live XI!Peter Hutterer1-19/+50
Let the drivers only generate XI events and put those into the event queue. When processing events, generate core events as needed. This fixes a number of problems with XKB and the DIX in general. The previous approach was to put core events and XI events as separate events into the event queue. When being processed, the server had no knowledge of them coming from the same device state change. Anything that would then change the state of the device accordingly was in danger of changing it twice, leading to some funny (i.e. not funny at all) results. Emulating core events while processing XI events fixes this, there is only one path that actually changes the device state now. Although we have to be careful when replaying events from synced devices, otherwise we may lose events. Note: XI has precedence over core for passive grabs, but core events are delivered to the client first. This removes the wrapping added in 340911d7243a7f1095d79b5b2dcfa81b145c2474
2007-09-26Input: Properly swap DevicePresenceNotify events.Eamon Walsh1-0/+3
2007-09-26Input: Return errors to the dispatcher instead of sending them ourself.Eamon Walsh35-652/+267
Also fixed two "unused variable: stuff" warnings.
2007-09-26Xi: fix the wrapper code for processInputProc wrapping.Peter Hutterer1-5/+15
Followup to [1]. If a core grab causes the device to freeze, it overwrites the processInputProc of the device. [1] would then overwrite this while unwrapping, the device does not thaw anymore. Changing this to only re-wrap if the processInputProc hasn't been changed during the event handling. [1] 340911d7243a7f1095d79b5b2dcfa81b145c2474
2007-09-26Xi: unify ErrorFs. Prefix all with [Xi].Peter Hutterer3-4/+4
2007-09-26Wrap core event handling through ProcessOtherEvents.Peter Hutterer1-9/+50
When processing events from the EQ, _always_ call the processInputProc of the matching device. For XI devices, this proc is wrapped in three layers. Core event handling is wrapped by XI event handling, which is wrapped by XKB. A core event now passes through XKB -> XI -> DIX. This gets rid of a sync'd grab problem: with the previous code, core events did disappear during a sync'd device grab on account of mieqProcessInputEvents calling the processInputProc of the VCP/VCK instead of the actual device. This lead to the event being processed as normal instead of being enqueued for later replaying.
2007-09-23Input: Generate XKB mapping changes for all core-sending devices (bug #12523)Daniel Stone3-4/+13
When we change the mapping on a core device, make sure we propagate this through to XKB for all extended devices as well.
2007-09-06dix: don't change the device struct while processing core events.Peter Hutterer2-3/+12
The device state needs to be changed while processing the XI event. Core events are always processed after XI, so by then the device is already set up properly. However, we now rely on DeviceButtonMotionMask to be equal to ButtonMotionMask. It already is, but stick a big fat warning in so nobody attempts to change it. This commit disables XKB for the VCK, thus essentially for all devices. Temporarily anyway.