From 15fe86e69fc256342881112cd07565527e32435b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Feb 2011 11:01:19 +1000 Subject: 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 Reviewed-by: Benjamin Tissoires --- mi/mipointer.c | 9 +++++---- mi/mipointrst.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'mi') 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 { -- cgit v1.2.3