dix: deduplicate SyntheticMotion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
34820f9c13
commit
5b2bbffc12
28
dix/events.c
28
dix/events.c
|
@ -402,16 +402,22 @@ static CARD8 criticalEvents[32] =
|
||||||
0x7c, 0x30, 0x40 /* key, button, expose, and configure events */
|
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
|
#ifdef PANORAMIX
|
||||||
static void PostNewCursor(DeviceIntPtr pDev);
|
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
|
static Bool
|
||||||
XineramaSetCursorPosition(
|
XineramaSetCursorPosition(
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
|
@ -550,14 +556,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
|
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 */
|
#endif /* PANORAMIX */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue