summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i830_cursor.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/i830_cursor.c b/src/i830_cursor.c
index b3736490..2cb069cc 100644
--- a/src/i830_cursor.c
+++ b/src/i830_cursor.c
@@ -1,4 +1,4 @@
-
+/* -*- c-basic-offset: 3 -*- */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -398,9 +398,15 @@ I830SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
x -= pScrn->frameX0;
y -= pScrn->frameY0;
- /* Clamp the cursor position to the visible screen area */
- if (x >= pScrn->currentMode->HDisplay) x = pScrn->currentMode->HDisplay - 1;
- if (y >= pScrn->currentMode->VDisplay) y = pScrn->currentMode->VDisplay - 1;
+ /* Clamp the cursor position to the visible screen area. Ignore this if we
+ * are doing motion (with SilkenMouse) while the currentMode being changed.
+ */
+ if (pScrn->currentMode != NULL) {
+ if (x >= pScrn->currentMode->HDisplay)
+ x = pScrn->currentMode->HDisplay - 1;
+ if (y >= pScrn->currentMode->VDisplay)
+ y = pScrn->currentMode->VDisplay - 1;
+ }
if (x <= -I810_CURSOR_X) x = -I810_CURSOR_X + 1;
if (y <= -I810_CURSOR_Y) y = -I810_CURSOR_Y + 1;