diff --git a/dix/events.c b/dix/events.c index cec12f0..28e927b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -426,15 +426,21 @@ static CARD8 criticalEvents[32] = }; #ifdef PANORAMIX -static void PostNewCursor(DeviceIntPtr pDev); +#define _MY_SCREEN_NUM(dev) \ + (noPanoramiXExtension ? 0 : (dev)->spriteInfo->sprite->screen->myNum) +#else +#define _MY_SCREEN_NUM(dev) 0 +#endif #define SyntheticMotion(dev, x, y) \ - PostSyntheticMotion(dev, x, y, noPanoramiXExtension ? 0 : \ - dev->spriteInfo->sprite->screen->myNum, \ + PostSyntheticMotion(dev, x, y, _MY_SCREEN_NUM(dev), \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); +#ifdef PANORAMIX +static void PostNewCursor(DeviceIntPtr pDev); + static Bool XineramaSetCursorPosition( DeviceIntPtr pDev, @@ -781,14 +787,6 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) } } -#else -#define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, \ - 0, \ - syncEvents.playingEvents ? \ - syncEvents.time.milliseconds : \ - currentTime.milliseconds); - #endif /* PANORAMIX */ void