mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 08:20:05 +01:00
dix: Always add valuator information if present
Send valuator information for all event types, not only for
MotionEvents and absolute button events.
(cherry picked from commit 12e5324032)
This commit is contained in:
parent
b95befdfd2
commit
7fa7031cfa
1 changed files with 2 additions and 5 deletions
|
|
@ -523,9 +523,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
int num_events = 0, final_valuator = 0;
|
||||
CARD32 ms = 0;
|
||||
deviceKeyButtonPointer *kbp = NULL;
|
||||
/* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies
|
||||
* with DeviceValuators. */
|
||||
Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE);
|
||||
DeviceIntPtr cp = inputInfo.pointer;
|
||||
int x = 0, y = 0;
|
||||
Bool coreOnly = (pDev == inputInfo.pointer);
|
||||
|
|
@ -551,7 +548,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
return 0;
|
||||
|
||||
/* Do we need to send a DeviceValuator event? */
|
||||
if (!coreOnly && sendValuators) {
|
||||
if (!coreOnly && num_valuators) {
|
||||
if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS)
|
||||
num_valuators = MAX_VALUATOR_EVENTS * 6;
|
||||
num_events += ((num_valuators - 1) / 6) + 1;
|
||||
|
|
@ -682,7 +679,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
kbp->root_y = y;
|
||||
|
||||
events++;
|
||||
if (sendValuators) {
|
||||
if (num_valuators) {
|
||||
kbp->deviceid |= MORE_EVENTS;
|
||||
clipValuators(pDev, first_valuator, num_valuators, valuators);
|
||||
events = getValuatorEvents(events, pDev, first_valuator,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue