Allow xf86_reload_cursors during server init.
xf86_reload_cursors is supposed to be called from the crtc mode setting commit hook; as that happens during server initialization, check for this case. (cherry picked from commit 5b77bf2d020b1ee56c1c5f2db089a8f7f64a76a6)
This commit is contained in:
parent
3b71b0f89f
commit
9562b6abe1
|
@ -548,12 +548,24 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
|
||||||
void
|
void
|
||||||
xf86_reload_cursors (ScreenPtr screen)
|
xf86_reload_cursors (ScreenPtr screen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
ScrnInfoPtr scrn;
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr xf86_config;
|
||||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
xf86CursorInfoPtr cursor_info;
|
||||||
CursorPtr cursor = xf86_config->cursor;
|
CursorPtr cursor;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
/* initial mode setting will not have set a screen yet */
|
||||||
|
if (!screen)
|
||||||
|
return;
|
||||||
|
scrn = xf86Screens[screen->myNum];
|
||||||
|
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
|
||||||
|
/* make sure the cursor code has been initialized */
|
||||||
|
cursor_info = xf86_config->cursor_info;
|
||||||
|
if (!cursor_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cursor = xf86_config->cursor;
|
||||||
GetSpritePosition (&x, &y);
|
GetSpritePosition (&x, &y);
|
||||||
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
||||||
(*cursor_info->HideCursor)(scrn);
|
(*cursor_info->HideCursor)(scrn);
|
||||||
|
|
Loading…
Reference in New Issue