From f2903c12bb4bb0b7c94b96c55af8fa55507f9d7d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 7 Nov 2006 11:13:32 +0200 Subject: [PATCH] SyntheticMotion: don't dereference sprite.screen when not using Xinerama (cherry picked from aa052e43c6c293e14f78837e00c6b7581f9713bb commit) --- dix/events.c | 3 ++- hw/kdrive/linux/keyboard.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dix/events.c b/dix/events.c index 7cfe0ad0c..0a39dcd9e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -328,7 +328,8 @@ static void ConfineToShape(RegionPtr shape, int *px, int *py); static void PostNewCursor(void); #define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, sprite.screen, \ + PostSyntheticMotion(x, y, noPanoramiXExtension ? 0 : \ + sprite.screen->myNum, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index b7571f66e..ad9907a59 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -745,14 +745,11 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki) cfsetispeed(&nTty, 9600); cfsetospeed(&nTty, 9600); tcsetattr(fd, TCSANOW, &nTty); - /* Our kernel cleverly ignores O_NONBLOCK. Sigh. */ -#if 0 /* * Flush any pending keystrokes */ while ((n = read (fd, buf, sizeof (buf))) > 0) ; -#endif KdRegisterFd (fd, LinuxKeyboardRead, ki); return Success; }