diff --git a/dix/events.c b/dix/events.c index 97d77305f..77badfd79 100644 --- a/dix/events.c +++ b/dix/events.c @@ -402,16 +402,22 @@ static CARD8 criticalEvents[32] = 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */ }; +static void +SyntheticMotion(DeviceIntPtr dev, int x, int y) { + int screenno = 0; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + screenno = dev->spriteInfo->sprite->screen->myNum; +#endif + PostSyntheticMotion(dev, x, y, screenno, + (syncEvents.playingEvents) ? syncEvents.time.milliseconds : currentTime.milliseconds); + +} + #ifdef PANORAMIX static void PostNewCursor(DeviceIntPtr pDev); -#define SyntheticMotion(dev, x, y) \ - PostSyntheticMotion(dev, x, y, noPanoramiXExtension ? 0 : \ - dev->spriteInfo->sprite->screen->myNum, \ - syncEvents.playingEvents ? \ - syncEvents.time.milliseconds : \ - currentTime.milliseconds); - static Bool XineramaSetCursorPosition( DeviceIntPtr pDev, @@ -550,14 +556,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); } -#else -#define SyntheticMotion(dev, x, y) \ - PostSyntheticMotion(dev, x, y, \ - 0, \ - syncEvents.playingEvents ? \ - syncEvents.time.milliseconds : \ - currentTime.milliseconds); - #endif /* PANORAMIX */ void