summaryrefslogtreecommitdiff
authorKeith Packard <keithp@keithp.com>2009-08-25 23:54:16 (GMT)
committer Keith Packard <keithp@keithp.com>2009-08-26 01:14:19 (GMT)
commit4aab05e3b3231f1ec9795a66a075d17a722634a7 (patch) (side-by-side diff)
treee152fcae2f78701647a98e5b1cff636e9107f5cf
parent0f9ffc887ca1471e98df746253d9300e03e46a15 (diff)
downloadxserver-4aab05e3b3231f1ec9795a66a075d17a722634a7.zip
xserver-4aab05e3b3231f1ec9795a66a075d17a722634a7.tar.gz
xf86_reload_cursors: fix cursor position to eliminate jumping after mode set
xf86_reload_cursors restores the cursor to the correct position, but that must adjust for cursor hot spot and frame before calling down to the hardware function, otherwise the cursor jumps to the wrong position until it is repositioned by the user. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--hw/xfree86/modes/xf86Cursors.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 8c5a94c..fc4df84 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -639,9 +639,11 @@ xf86_reload_cursors (ScreenPtr screen)
(*cursor_info->LoadCursorARGB) (scrn, cursor);
else if (src)
#endif
- (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
+ (*cursor_info->LoadCursorImage)(scrn, src);
- (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
+ x += scrn->frameX0 + cursor_screen_priv->HotX;
+ y += scrn->frameY0 + cursor_screen_priv->HotY;
+ (*cursor_info->SetCursorPosition)(scrn, x, y);
}
}