diff options
Diffstat (limited to 'xorg-server/hw/xnest/Events.c')
-rw-r--r-- | xorg-server/hw/xnest/Events.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xorg-server/hw/xnest/Events.c b/xorg-server/hw/xnest/Events.c index 88970bbe0..6b8edf143 100644 --- a/xorg-server/hw/xnest/Events.c +++ b/xorg-server/hw/xnest/Events.c @@ -25,6 +25,7 @@ is" without express or implied warranty. #include "windowstr.h"
#include "servermd.h"
#include "inputstr.h"
+#include "inpututils.h"
#include "mi.h"
@@ -117,6 +118,7 @@ xnestCollectEvents(void) {
XEvent X;
int i, n, valuators[2];
+ ValuatorMask mask;
ScreenPtr pScreen;
GetEventList(&xnestEvents);
@@ -133,19 +135,21 @@ xnestCollectEvents(void) break;
case ButtonPress:
+ valuator_mask_set_range(&mask, 0, 0, NULL);
xnestUpdateModifierState(X.xkey.state);
lastEventTime = GetTimeInMillis();
n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress,
- X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
+ X.xbutton.button, POINTER_RELATIVE, &mask);
for (i = 0; i < n; i++)
mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
break;
case ButtonRelease:
+ valuator_mask_set_range(&mask, 0, 0, NULL);
xnestUpdateModifierState(X.xkey.state);
lastEventTime = GetTimeInMillis();
n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease,
- X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
+ X.xbutton.button, POINTER_RELATIVE, &mask);
for (i = 0; i < n; i++)
mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
break;
@@ -153,9 +157,10 @@ xnestCollectEvents(void) case MotionNotify:
valuators[0] = X.xmotion.x;
valuators[1] = X.xmotion.y;
+ valuator_mask_set_range(&mask, 0, 2, valuators);
lastEventTime = GetTimeInMillis();
n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
- 0, POINTER_ABSOLUTE, 0, 2, valuators);
+ 0, POINTER_ABSOLUTE, &mask);
for (i = 0; i < n; i++)
mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
break;
@@ -186,9 +191,10 @@ xnestCollectEvents(void) NewCurrentScreen(inputInfo.pointer, pScreen, X.xcrossing.x, X.xcrossing.y);
valuators[0] = X.xcrossing.x;
valuators[1] = X.xcrossing.y;
+ valuator_mask_set_range(&mask, 0, 2, valuators);
lastEventTime = GetTimeInMillis();
n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
- 0, POINTER_ABSOLUTE, 0, 2, valuators);
+ 0, POINTER_ABSOLUTE, &mask);
for (i = 0; i < n; i++)
mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
xnestDirectInstallColormaps(pScreen);
|