Commit 0b8f8b24 authored by Stuart Bennett's avatar Stuart Bennett Committed by Keith Packard

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's avatarKeith Packard <>
parent 9c5dd733
...@@ -602,12 +602,19 @@ xf86_reload_cursors (ScreenPtr screen) ...@@ -602,12 +602,19 @@ xf86_reload_cursors (ScreenPtr screen)
xf86CursorInfoPtr cursor_info; xf86CursorInfoPtr cursor_info;
CursorPtr cursor; CursorPtr cursor;
int x, y; int x, y;
xf86CursorScreenPtr cursor_screen_priv;
/* initial mode setting will not have set a screen yet. /* initial mode setting will not have set a screen yet.
May be called before the devices are initialised. May be called before the devices are initialised.
*/ */
if (!screen || !inputInfo.pointer) if (!screen || !inputInfo.pointer)
return; return;
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
/* return if HW cursor is inactive, to avoid displaying two cursors */
if (!cursor_screen_priv->isUp)
scrn = xf86Screens[screen->myNum]; scrn = xf86Screens[screen->myNum];
xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
...@@ -615,7 +622,7 @@ xf86_reload_cursors (ScreenPtr screen) ...@@ -615,7 +622,7 @@ xf86_reload_cursors (ScreenPtr screen)
cursor_info = xf86_config->cursor_info; cursor_info = xf86_config->cursor_info;
if (!cursor_info) if (!cursor_info)
return; return;
cursor = xf86_config->cursor; cursor = xf86_config->cursor;
GetSpritePosition (inputInfo.pointer, &x, &y); GetSpritePosition (inputInfo.pointer, &x, &y);
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
...@@ -636,7 +643,6 @@ xf86_reload_cursors (ScreenPtr screen) ...@@ -636,7 +643,6 @@ xf86_reload_cursors (ScreenPtr screen)
(*cursor_info->LoadCursorImage)(cursor_info->pScrn, src); (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y); (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment