aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmouse.c')
-rw-r--r--xorg-server/hw/xwin/winmouse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c
index b37d5cf67..6dac21520 100644
--- a/xorg-server/hw/xwin/winmouse.c
+++ b/xorg-server/hw/xwin/winmouse.c
@@ -46,6 +46,7 @@
#include "inputstr.h"
#include "exevents.h" /* for button/axes labels */
#include "xserver-properties.h"
+#include "inpututils.h"
/* Peek the internal button mapping */
static CARD8 const *g_winMouseButtonMap = NULL;
@@ -242,13 +243,15 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
{
EventListPtr events;
int i, nevents;
+ ValuatorMask mask;
if (g_winMouseButtonMap)
iButton = g_winMouseButtonMap[iButton];
+ valuator_mask_zero(&mask);
GetEventList(&events);
nevents = GetPointerEvents(events, g_pwinPointer, iEventType, iButton,
- POINTER_RELATIVE, 0, 0, NULL);
+ POINTER_RELATIVE, &mask);
for (i = 0; i < nevents; i++)
mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
@@ -371,15 +374,17 @@ void winEnqueueMotion(int x, int y)
{
int i, nevents;
int valuators[2];
+ ValuatorMask mask;
EventListPtr events;
miPointerSetPosition(g_pwinPointer, &x, &y);
valuators[0] = x;
valuators[1] = y;
+ valuator_mask_set_range(&mask, 0, 2, valuators);
GetEventList(&events);
nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
- POINTER_ABSOLUTE | POINTER_SCREEN, 0, 2, valuators);
+ POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
for (i = 0; i < nevents; i++)
mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);