diff options
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index d68eeee62..d156cf3ed 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -747,7 +747,10 @@ CheckPhysLimits( {
#ifdef PANORAMIX
if (!noPanoramiXExtension)
- XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents);
+ {
+ if (pScreen && ((new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)))
+ XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents);
+ }
else
#endif
{
@@ -2732,6 +2735,9 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) CHECKEVENT(ev);
+ if (!pSprite)
+ return FALSE;
+
prevSpriteWin = pSprite->win;
if (ev && !syncEvents.playingEvents)
@@ -3138,7 +3144,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) }
} else
#endif
- if (newScreen != pSprite->hotPhys.pScreen)
+ if (newScreen != pSprite->hotPhys.pScreen && WindowTable[newScreen->myNum])
ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum],
TRUE, FALSE);
}
|