summaryrefslogtreecommitdiff
path: root/dix
AgeCommit message (Collapse)AuthorFilesLines
2007-10-24dix: Don't interfere grabs the interfering device is of different type.Peter Hutterer1-1/+3
A pointer device should be able to send events while the client has a core grab on a keyboard device, and likewise.
2007-10-24dix: check for core passive grabs on inferiors when replaying events.Peter Hutterer1-3/+9
2007-10-09dix: change a few inputInfo.keyboard over to PickKeyboard()Peter Hutterer1-5/+5
2007-10-05dix: when disabling a device, make sure all paired devices are re-paired.Peter Hutterer1-1/+11
We re-pair them with the VCP, not a real device! If we would do otherwise, somebody may change our keyboard focus and thus get us typing where we don't want to type.
2007-10-05dix: When pairing, only check for access right if client is set.Peter Hutterer1-1/+4
If the pairing client is not set, then the pairing is initiated internally (e.g. when a new keyboard device is configured). In this case we _must_ pair regardless of who is the pairing client.
2007-10-03dix: ignore passive grab if the client already has a grab on the device.Peter Hutterer1-0/+29
In some cases a button press may activate a passive core grab. If the client owning the passive grab already has a core grab on another device, don't actually activate it. Otherwise the client gets two simultaneous passive core grabs, and may never ungrab the device again (only if the other grab uses GrabModeSync). Reproducable: fire up gnome-session, open up gnome-terminal. Click with the ClientPointer onto the window decoration, then click with another pointer onto an application icon in the panel. Drag the icon out, release the button and voila - you just lost your second mouse.
2007-10-03dix: send NotifyGrab/NotifyUngrab focus events regardless of semaphore state.Peter Hutterer1-2/+4
This is just papering over a problem. The whole focus system needs to be revised.
2007-10-03dix: change Enter/Leave semaphore handling to accommodate for NotifyGrab.Peter Hutterer1-3/+23
This is a half-assed attempt at getting rid of some enter-leave problems. When a grab is activated, the events didn't get sent before, leading to interesting results. This commit papers over it but doesn't actually fix it properly. The whole enter/leave (focusin/out) structure needs to be ripped out and changed for multiple devices.
2007-10-02dix: Ignore devices when deleting passive core grabs.Peter Hutterer1-1/+1
2007-09-28Remove generation of core events, long live XI!Peter Hutterer2-40/+78
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-28dix: GetPairedKeyboard() always returns a valid keyboard (VCK if necessary).Peter Hutterer2-14/+6
We need it unconditionally in a few places, and the rest checked for NULL and then set it to VCK anyway. So, fixing up all callers to appreciate the defined return value.
2007-09-28dix: take paired keyboard instead of VCK (CoreProcessPointerEvents)Peter Hutterer1-1/+1
2007-09-27dix: GetMaximumEventsNum() needs to return 3 + MAX_VALUATOR_EVENTS.Peter Hutterer1-3/+4
Raw events can be generated for pointer events, so 2 + MVE isn't enough.
2007-09-26dix: unify ErrorFs. prepend all with [dix].Peter Hutterer9-36/+37
2007-09-26dix: GetPointerEvents: remove unused variable compiler warning.Peter Hutterer1-1/+0
2007-09-26dix: add comments to PlayReleasedEvents()Peter Hutterer1-0/+10
Also stick another warning in, more changes needed for XGE if panoramix is active.
2007-09-26dix: add comments to ComputeFreezes() and syncEvents struct.Peter Hutterer1-0/+21
2007-09-24dix: cosmetic change. Remove "pointer" variable, might as well use pDev.Peter Hutterer1-7/+6
2007-09-24dix: fix compiler warnings about unused variables.Peter Hutterer1-7/+6
2007-09-24dix: fix "possible use of uninitialized variable" warning.Peter Hutterer1-1/+1
The device passed through to UnrealizeCursor isn't used anyway, so setting it to NULL is enough.
2007-09-24dix: don't try to access "time" field for GenericEvents in PlayReleasedEvent.Peter Hutterer1-1/+12
GenericEvents can't be parsed to keyButtonPointer, and there's no guarantee that it has a time field anyway. PlayReleasedEvent needs to store the millis when we know it (core events, XI event) and just re-use them for GenericEvents. Yes, this is a hack. But it looks like the time has zero significance anyway.
2007-09-24dix: fix comment for DeliverDeviceEvents.Peter Hutterer1-3/+10
DDE is not always called, grabbed or focused devices go through Deliver{Grabbed|Focus}Event first. Thanks to Eamon Walsh for spotting it.
2007-09-24dix: Make EnqueueEvent aware of GenericEvents.Peter Hutterer1-7/+27
GenericEvents can be > sizeof(xEvents), so we need to make sure we're allocating and copying enough memory for the event.
2007-09-24dix: don't compress motion events from different devices (EventEnqueue)Peter Hutterer1-1/+2
2007-09-07dix: Enabling devices must not overwrite existing sprites/pairing.Peter Hutterer1-4/+7
EnableDevices is (amongst others )called after a VT switch. We must not create a new sprite or re-pair the device, otherwise we lose the input device setup that we had before the VT switch. This requires the devices to be in exactly the same order as before the VT switch. Removing a device while on a different VT is probably a bad idea.
2007-09-06dix: add XI event support to FixKeyState.Peter Hutterer1-12/+9
FixKeyState needs to be able to handle XI events, otherwise we get "impossible keyboard events" on server zaps and other special key combos.
2007-09-06dix: close virtual core devices after other devices.Peter Hutterer1-3/+4
If a device is paired with the VCP, deleting the VCP before the device will segfault the server when the sprite should get updated.
2007-09-06dix: don't change the device struct while processing core events.Peter Hutterer2-57/+19
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.
2007-09-05Revert "Input: Fix stuck modifiers (bug #11683)"Peter Hutterer1-30/+26
This reverts commit 6b055e5d9751e3679ff98065e43225ec8a960053. MPX relies on the XI event being delivered before the core event. Device grabs break, amongst other things. I guess stuck modifiers need to be fixed some other way. Conflicts: dix/getevents.c
2007-08-23dix: Only check device events for possible ACLs.Peter Hutterer2-5/+34
We shouldn't be able to restrict events like Expose, etc. with device based ACLs. So we just ignore all non-input events when checking for permissions.
2007-08-20dix: ProcChangeActivePointerGrab: make sure variable is initialised.Peter Hutterer1-2/+6
Thanks to Ben Close for spotting it.
2007-08-15dix: ProcUngrabKeyboard: make sure grab is initialized.Peter Hutterer1-0/+2
This should fix the random segfaults with ProcUngrabKeyboard. Thanks to David Nolden for spotting it.
2007-08-12Merge branch 'master' into mpxPeter Hutterer11-137/+233
Conflicts: Xi/exevents.c dix/devices.c dix/getevents.c include/dix.h mi/mieq.c
2007-08-08Fix typo from last commit. Oh well.Peter Hutterer1-1/+1
2007-08-08dix: Allow flexible devices for passive core grabs.Peter Hutterer2-16/+205
A passive core grab doesn't specify the device, and is thus created with the ClientPointer as device. When this grab is activated later, don't actually activate the grab on the grab device, but rather change the device to the one that caused the grab to activate. Same procedure for keyboards. Makes core apps _A LOT_ more useable and reduces the need to set the ClientPointer. Only applies to core grabs!
2007-08-07dix: get the paired keyboard for a passive grab (ProcGrabButton).Peter Hutterer1-2/+7
Taking the VCK is only correct if no physical device is connected, and even then it's not really a good idea.
2007-08-07dix: check for core event to determine if grab is a core grab (CreateGrab).Peter Hutterer1-2/+1
Checking for VCP/VCK is simply not a safe way to check if a grab is a core grab.
2007-08-01Build system: Non-dtrace distcheck hacksDaniel Stone1-0/+5
automake 1.10 really wants foo.c for foo.O, so give it some dummy files to deal with if it really needs them.
2007-08-01Input: Fix stuck modifiers (bug #11683)Daniel Stone1-26/+28
Disclaimer: It's 6:51am. I'm trying to be as understandable as possible. What was happening previously was this: * Press Alt * Extended event generated and processed: state is now Alt down once * Core event generated - keyboard switched: inherited state is Alt down once - event processed: Alt down twice * Release Alt * Extended event generated and processed: state is now null * Core event generated and processed: Alt down once If we switch the order: * Press Alt * Core event generated: - keyboard switched: inherited state is null - event processed: Alt down once * Extended event generated and processed: state is now Alt down once * Release Alt * Core event generated and processed: state is now null * Extended event generated and processed: state is now null When we carry over the previous state, it needs to be the _previous_ state (state and modifiersPerKey), assuming that we're going to catch now-core events for any of these. For example, if Ctrl is held down as we pivot, we need to carry Ctrl over with a count of one, for which an extended + core release will then clear. Carrying over the union of the previous state _and the state resulting from the immediate action_ was what broke things.
2007-08-01Convert all my license statements to the standard formDaniel Stone1-15/+17
Convert all my license statements to the standard, accepted form: cf. <20070717142307.GD13478@fooishbar.org> http://lists.freedesktop.org/archives/xorg/2007-July/026451.html keithp's license on configure.ac changed with his verbal permission.
2007-08-01Hotplug: Add HAL supportDaniel Stone1-0/+1
Add support for HAL-based hotplugging, in which we just get the list of input devices and properties from HAL. Requires an FDI which is not yet in mainline HAL.
2007-08-01Input: GetPointerEvents: Deny events from devices without valuatorsDaniel Stone1-2/+6
For some reason, my keyboard has 25 mouse buttons, but zero valuators. This causes GPE to blow up spectacularly, trying to get (and set) co-ordinates from devices without valuators. For now, just prevent this from ever happening, and whack a dirty great FIXME in.
2007-08-01DIX: Clean up null root cursor handlingDaniel Stone2-16/+20
Move the null root cursor handling out of main() and into CreateRootCursor.
2007-08-01Fonts: Fix builtin fontsDaniel Stone1-6/+4
Make sure the font path is always 'built-ins' when we use built-in fonts, rather than having it as a fixed path for a while, then clobbering it halfway through startup.
2007-08-01Hotplug: Separate D-Bus into core and hotplug API componentsDaniel Stone1-2/+2
Break up D-Bus into two components: a D-Bus core that can be used by any part of the server (for the moment, just the D-Bus hotplug API, and the forthcoming HAL hotplug API), and the old D-Bus hotplug API.
2007-07-21Partial redundancy elimination in PropertyNotify generation.Adam Jackson1-43/+21
2007-07-10DeliverEventsToWindow: ensure that genericMask has a defined value.Peter Hutterer1-3/+2
2007-07-10Change CheckMotion to ignore non-pointer events but acknowledge XI events.Peter Hutterer1-22/+50
Call CheckMotion from ProcessOtherEvents() to make sure absolute XI events update the sprite before an event is sent.
2007-07-10DeliverGrabbedEvent: stop segfault when gemask == NULL.Peter Hutterer1-1/+1
2007-07-10Call CheckMotion for all core events.Peter Hutterer1-2/+7
We need to do this to update the sprites x/y coordinate before we assemble a button event. Absolute devices may send a buttonEvent with valuators attached. If we don't update the sprite before assembling the event, the valuators are lost and the button press is delivered to the previous position of the device. Doesn't have any effect on relative devices.