Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Probably need to redo the error return paths in these functions
at some point.
|
|
|
|
Conflicts:
os/access.c
|
|
|
|
|
|
|
|
Simplifies it a lot, since we always have at least one master device
available at all times, so less mucking around.
|
|
|
|
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.
|
|
This is just papering over a problem. The whole focus system needs to be
revised.
|
|
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.
|
|
* 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 340911d7243a7f1095d79b5b2dcfa81b145c2474
|
|
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.
|
|
|
|
|
|
Also stick another warning in, more changes needed for XGE if panoramix is
active.
|
|
|
|
|
|
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.
|
|
DDE is not always called, grabbed or focused devices go through
Deliver{Grabbed|Focus}Event first.
Thanks to Eamon Walsh for spotting it.
|
|
GenericEvents can be > sizeof(xEvents), so we need to make sure we're
allocating and copying enough memory for the event.
|
|
|
|
|
|
FixKeyState needs to be able to handle XI events, otherwise we get "impossible
keyboard events" on server zaps and other special key combos.
|
|
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.
|
|
delivery of events to windows and clients.
This is tentative. It's likely that an additional last-resort hook will
be necessary for code that calls TryClientEvents or WriteEventsToClient
directly. It's also possible that new xace machinery will be necessary
to classify events and pull useful resource ID's out of them.
The failure case also needs some thinking through. Should event delivery
"succeed" or should it report undeliverable?
Finally, XKB appears to call WriteToClient to pass events. Sigh.
|
|
|
|
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.
|
|
Thanks to Ben Close for spotting it.
|
|
|
|
This should fix the random segfaults with ProcUngrabKeyboard.
Thanks to David Nolden for spotting it.
|
|
Conflicts:
Xi/exevents.c
dix/devices.c
dix/getevents.c
include/dix.h
mi/mieq.c
|
|
|
|
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!
|
|
Taking the VCK is only correct if no physical device is connected, and even
then it's not really a good idea.
|
|
Conflicts:
dix/devices.c
dix/property.c
include/dix.h
|
|
|
|
Call CheckMotion from ProcessOtherEvents() to make sure absolute XI events
update the sprite before an event is sent.
|
|
|
|
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.
|
|
Renaming those structs too.
Previously grabs were using a different struct than windows, which was
reasonably stupid.
|
|
We need this to allow extensions to fill in extra data for an event before it
is sent to the client. This is probably to be used like
FillUpEventsFromWindow().
|
|
some minor cosmetic.
|
|
This is definitely necessary in CheckDeviceGrabAndHintWindow (thanks to Paulo
Zanoni for spotting it). We're resetting it everywhere else too, just to be
save.
|
|
|
|
Device drivers flush their buttons on device init and cause a button down
event to be generated. If we unconditionally decrease the buttons, we won't be
able to ever get a passive device grab.
Format documentation for CheckDeviceGrabs to make it readable.
(cherry picked from commit 3e894974cdd6a75683d4601f71622d1da7ec4395)
Conflicts:
Xi/exevents.c
|
|
Conflicts:
dix/devices.c
hw/xfree86/common/xf86Xinput.c
hw/xfree86/loader/xf86sym.c
mi/mieq.c
|
|
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.
|