diff --git a/dix/events.c b/dix/events.c index 3b1a0aaf4..ce053b347 100644 --- a/dix/events.c +++ b/dix/events.c @@ -327,11 +327,10 @@ static CARD8 criticalEvents[32] = #ifdef PANORAMIX static void ConfineToShape(RegionPtr shape, int *px, int *py); -extern void PostSyntheticMotion(int x, int y, int screenNum, int time); static void PostNewCursor(void); #define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, sprite.screen->myNum, \ + PostSyntheticMotion(x, y, sprite.screen, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); diff --git a/dix/getevents.c b/dix/getevents.c index b19a73fa6..1d9502802 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -38,6 +38,7 @@ #include "dixstruct.h" #include "globals.h" +#include "dixevents.h" #include "mipointer.h" @@ -758,7 +759,7 @@ SwitchCorePointer(DeviceIntPtr pDev) * to shift the pointer to get it inside the new bounds. */ void -PostSyntheticMotion(int x, int y, int screenNum, unsigned long time) +PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time) { xEvent xE; @@ -767,8 +768,8 @@ PostSyntheticMotion(int x, int y, int screenNum, unsigned long time) will translate from sprite screen to screen 0 upon reentry to the DIX layer. */ if (!noPanoramiXExtension) { - x += panoramiXdataPtr[0].x - panoramiXdataPtr[screenNum].x; - y += panoramiXdataPtr[0].y - panoramiXdataPtr[screenNum].y; + x += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; + y += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; } #endif @@ -776,6 +777,7 @@ PostSyntheticMotion(int x, int y, int screenNum, unsigned long time) xE.u.u.type = MotionNotify; xE.u.keyButtonPointer.rootX = x; xE.u.keyButtonPointer.rootY = y; + xE.u.keyButtonPointer.time = time; (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1); } diff --git a/include/dixevents.h b/include/dixevents.h index 2a9458f08..c78fb0e85 100644 --- a/include/dixevents.h +++ b/include/dixevents.h @@ -102,4 +102,8 @@ extern int ProcUngrabButton(ClientPtr /* client */); extern int ProcRecolorCursor(ClientPtr /* client */); +#ifdef PANORAMIX +extern void PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time); +#endif + #endif /* DIXEVENTS_H */