[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: [PATCH 5/5] dix: deduplicate SyntheticMotion.
From: Peter Hutterer <peter.hutterer () who-t ! net>
Date: 2009-01-30 7:05:32
Message-ID: 1233299132-17811-6-git-send-email-peter.hutterer () who-t ! net
[Download RAW message or body]
---
dix/events.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index abee4b9..f677bb6 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -402,15 +402,21 @@ 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
-static void PostNewCursor(DeviceIntPtr pDev);
+ if (!noPanoramiXExtension)
+ screenno = dev->spriteInfo->sprite->screen->myNum;
+#endif
+ PostSyntheticMotion(dev, x, y, screenno,
+ (syncEvents.playingEvents) ? syncEvents.time.milliseconds : currentTime.milliseconds);
-#define SyntheticMotion(dev, x, y) \
- PostSyntheticMotion(dev, x, y, noPanoramiXExtension ? 0 : \
- dev->spriteInfo->sprite->screen->myNum, \
- syncEvents.playingEvents ? \
- syncEvents.time.milliseconds : \
- currentTime.milliseconds);
+}
+
+#ifdef PANORAMIX
+static void PostNewCursor(DeviceIntPtr pDev);
static Bool
XineramaSetCursorPosition(
@@ -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
--
1.6.0.6
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic