mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Count the number of logically down buttons in buttonsDown
This fixes the following bug. Assuming your window manager grabs Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, then press the physical button 3 (this shouldn't have any effect), press Alt and then button 1. The press event is delivered to the application instead of firing the grab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
6f065a26db
commit
f7f85f6965
@@ -946,10 +946,10 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
|
||||
*kptr |= bit;
|
||||
if (device->valuator)
|
||||
device->valuator->motionHintWindow = NullWindow;
|
||||
b->buttonsDown++;
|
||||
b->motionMask = DeviceButtonMotionMask;
|
||||
if (!b->map[key])
|
||||
return DONT_PROCESS;
|
||||
b->buttonsDown++;
|
||||
b->motionMask = DeviceButtonMotionMask;
|
||||
if (b->map[key] <= 5)
|
||||
b->state |= (Button1Mask >> 1) << b->map[key];
|
||||
SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
|
||||
@@ -978,10 +978,10 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
|
||||
*kptr &= ~bit;
|
||||
if (device->valuator)
|
||||
device->valuator->motionHintWindow = NullWindow;
|
||||
if (b->buttonsDown >= 1 && !--b->buttonsDown)
|
||||
b->motionMask = 0;
|
||||
if (!b->map[key])
|
||||
return DONT_PROCESS;
|
||||
if (b->buttonsDown >= 1 && !--b->buttonsDown)
|
||||
b->motionMask = 0;
|
||||
if (b->map[key] <= 5)
|
||||
b->state &= ~((Button1Mask >> 1) << b->map[key]);
|
||||
SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
|
||||
|
||||
Reference in New Issue
Block a user