summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bennett <sb476@cam.ac.uk>2008-12-02 22:52:53 -0800
committerKeith Packard <keithp@keithp.com>2008-12-02 23:08:01 -0800
commit0d902b05ad910cada46dcc2b85d8b0148aed35e6 (patch)
tree21b582c3823a4a285ad17652f423dd757bac9091
parentcbf4fec52960ffd74b78ea45d0b917c76f553ebf (diff)
xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820)
Also, no need to call ShowCursor when SetCursorPosition already does it Based on a previous patch by Maarten Maathuis Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 0b8f8b24f718820a72ebdc52423c2e6a44e848c5)
-rw-r--r--hw/xfree86/modes/xf86Cursors.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index a58b00184..3106f051b 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -602,12 +602,19 @@ xf86_reload_cursors (ScreenPtr screen)
xf86CursorInfoPtr cursor_info;
CursorPtr cursor;
int x, y;
+ xf86CursorScreenPtr cursor_screen_priv;
/* initial mode setting will not have set a screen yet.
May be called before the devices are initialised.
*/
if (!screen || !inputInfo.pointer)
return;
+ cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
+ xf86CursorScreenKey);
+ /* return if HW cursor is inactive, to avoid displaying two cursors */
+ if (!cursor_screen_priv->isUp)
+ return;
+
scrn = xf86Screens[screen->myNum];
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -615,7 +622,7 @@ xf86_reload_cursors (ScreenPtr screen)
cursor_info = xf86_config->cursor_info;
if (!cursor_info)
return;
-
+
cursor = xf86_config->cursor;
GetSpritePosition (inputInfo.pointer, &x, &y);
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
@@ -636,7 +643,6 @@ xf86_reload_cursors (ScreenPtr screen)
(*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
- (*cursor_info->ShowCursor)(cursor_info->pScrn);
}
}