mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-26 01:59:57 +00:00
dix: change the filters to be per-device.
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.
This commit is contained in:
parent
0931f40bf1
commit
f44d7dcb5f
4 changed files with 52 additions and 29 deletions
|
|
@ -550,7 +550,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
|
|||
return DONT_PROCESS;
|
||||
if (b->map[key] <= 5)
|
||||
b->state |= (Button1Mask >> 1) << b->map[key];
|
||||
SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify);
|
||||
SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
|
||||
} else if (xE->u.u.type == DeviceButtonRelease) {
|
||||
if (!b)
|
||||
return DONT_PROCESS;
|
||||
|
|
@ -567,7 +567,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
|
|||
return DONT_PROCESS;
|
||||
if (b->map[key] <= 5)
|
||||
b->state &= ~((Button1Mask >> 1) << b->map[key]);
|
||||
SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify);
|
||||
SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
|
||||
} else if (xE->u.u.type == ProximityIn)
|
||||
device->valuator->mode &= ~OutOfProximity;
|
||||
else if (xE->u.u.type == ProximityOut)
|
||||
|
|
|
|||
Loading…
Reference in a new issue