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.
the hook - the hook only needs the Atom to control access to the selection
object. Upgraded the SelectionCallback to take a client argument and
additional type codes so that it can be used for redirection.
* dix/events.c, include/dix.h:
(UpdateSpriteForScreen): added this to update the mouse sprite context
when we switch from a pScreen to another.
* mi/mipointer.c:
(miPointerWarpCursor): as we are switching to a new pScreen,
don't forget to update the mouse sprite context.
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 340911d724
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Is set when passive grab is implicit as result of a ButtonPress event. If this
is the case, we need to store the XI mask as well as the core mask to ensure
delivery of XI events during the grab's lifetime.
Remove all core grabs on other devices when client issues a GrabPointer or
GrabKeyboard request. Let's assume that the client really only wants one
device to interact, so this seems like a reasonable solution.
Add XGE handling in DeliverGrabbedEvent.
We can now grab something selecting XGE events, but the current code is a
bit messy and doesn't work too well yet.
Add RawDeviceEvent (pointers only for now).
This commit changes the event queue to use EventLists instead of xEvent
arrays. Only EQ is affected, event delivery still uses xEvent* (look for
comment in mieqProcessInputEvent).
RawDeviceEvents deliver driver information to the client, without clipping or
acceleration.
Requires moving the spriteTrace into the DeviceIntRec and adjusting a few
functions to take in device argument, most notably XYToWindow().
Cursor rendering on the second screen is busted.
Improve memory usage by allocating the sprite's memory only to devices that
actually have a sprite and provide means to remove a device's cursor from the
screen (more hotplugging, yay!).
This commit breaks ScreenRec's ABI.
dix: IsPointerDevice and IsKeyboardDevice, use same ways to identify type
of device as XI does for the XListInputDevices reply.
Autopair each non-pointer device with VCP when activating, pair with
real device after activation.
Don't return non-keyboard devices when calling GetPairedKeyboard or
PickKeyboard, otherwise we segfault for 'evdev brain'.
otherwise a Xi grab may overwrite or release a core grab.
Replace grab and associates with coreGrab and deviceGrab structures,
adjust rest of dix/Xi/etc to compile.
xfree86: Don't check for core devices, we'll have the virtual ones anyway.
If we check, the first mouse device is duplicated and sends
double events.
ambiguious request. PickPointer and PickKeyboard are used for getting
the appropriate pointer when situation is unclear.
Fix some issues with InitializeSprite.
dix, xfree86: Remove last traces of InitSprite.