aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/darwinEvents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xquartz/darwinEvents.c')
-rw-r--r--xorg-server/hw/xquartz/darwinEvents.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c
index a00c89ecd..ec320b3a5 100644
--- a/xorg-server/hw/xquartz/darwinEvents.c
+++ b/xorg-server/hw/xquartz/darwinEvents.c
@@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
#include "windowstr.h"
#include "pixmapstr.h"
#include "inputstr.h"
+#include "inpututils.h"
#include "eventstr.h"
#include "mi.h"
#include "scrnintstr.h"
@@ -464,8 +465,10 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
darwinEvents_lock(); {
+ ValuatorMask mask;
+ valuator_mask_set_range(&mask, 0, (pDev == darwinTabletCurrent) ? 5 : 2, valuators);
num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button,
- POINTER_ABSOLUTE, 0, pDev==darwinTabletCurrent?5:2, valuators);
+ POINTER_ABSOLUTE, &mask);
for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();
@@ -507,8 +510,9 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, 0.0f, 0.0f, 0.0f);
darwinEvents_lock(); {
- num_events = GetProximityEvents(darwinEvents, pDev, ev_type,
- 0, 5, valuators);
+ ValuatorMask mask;
+ valuator_mask_set_range(&mask, 0, 5, valuators);
+ num_events = GetProximityEvents(darwinEvents, pDev, ev_type, &mask);
for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
if(num_events > 0) DarwinPokeEQ();
} darwinEvents_unlock();