summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-02-11 11:01:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-02-22 14:35:43 +1000
commit15fe86e69fc256342881112cd07565527e32435b (patch)
tree243e7cd678a8b3e525239ac4f72e093ecf8a8e1d /mi
parent93a73993708b1345c86ec3ec06b02ed236595673 (diff)
mi: remove static GenerateEvent variable.
Push into the respective devices. This should have no functional changes since we never warp more than one device at a time. In the glorious future with true multithreading, still the better thing to do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'mi')
-rw-r--r--mi/mipointer.c9
-rw-r--r--mi/mipointrst.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 554397a3b..5ee456c71 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -220,15 +220,15 @@ miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
*pTopLeftBox = *pHotBox;
}
-static Bool GenerateEvent;
-
static Bool
miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
int x, int y, Bool generateEvent)
{
SetupScreen (pScreen);
+ miPointerPtr pPointer = MIPOINTER(pDev);
+
+ pPointer->generateEvent = generateEvent;
- GenerateEvent = generateEvent;
/* device dependent - must pend signal and call miPointerWarpCursor */
(*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y);
if (!generateEvent)
@@ -261,6 +261,7 @@ miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
pPointer->confined = FALSE;
pPointer->x = 0;
pPointer->y = 0;
+ pPointer->generateEvent = FALSE;
if (!((*pScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen)))
{
@@ -306,7 +307,7 @@ miPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
changedScreen = TRUE;
}
- if (GenerateEvent)
+ if (pPointer->generateEvent)
miPointerMove (pDev, pScreen, x, y);
else
miPointerMoveNoEvent(pDev, pScreen, x, y);
diff --git a/mi/mipointrst.h b/mi/mipointrst.h
index bd9c24a00..c912a17da 100644
--- a/mi/mipointrst.h
+++ b/mi/mipointrst.h
@@ -44,6 +44,7 @@ typedef struct {
Bool confined; /* pointer can't change screens */
int x, y; /* hot spot location */
int devx, devy; /* sprite position */
+ Bool generateEvent; /* generate an event during warping? */
} miPointerRec, *miPointerPtr;
typedef struct {