mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 16:39:06 +00:00
dix: only allow button and key events to freeze a sync'd pointer
If a client calls XAllowEvents(SyncPointer) it expects events as normal until the next button press or release event - that freezes the device. An e.g. proximity event must thus not freeze the pointer. As per the spec, only button and key events may do so, so narrow it to these cases. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -4268,7 +4268,11 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
||||
if (deliveries && (event->any.type == ET_Motion))
|
||||
thisDev->valuator->motionHintWindow = grab->window;
|
||||
}
|
||||
if (deliveries && !deactivateGrab && event->any.type != ET_Motion) {
|
||||
if (deliveries && !deactivateGrab &&
|
||||
(event->any.type == ET_KeyPress ||
|
||||
event->any.type == ET_KeyRelease ||
|
||||
event->any.type == ET_ButtonPress ||
|
||||
event->any.type == ET_ButtonRelease)) {
|
||||
switch (grabinfo->sync.state) {
|
||||
case FREEZE_BOTH_NEXT_EVENT:
|
||||
dev = GetPairedDevice(thisDev);
|
||||
|
||||
Reference in New Issue
Block a user