diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index 57cfcb6..a3d4c9f 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -594,7 +594,9 @@ xf86_reload_cursors (ScreenPtr screen) xf86CursorInfoPtr cursor_info; CursorPtr cursor; int x, y; - + Bool hwcursor_visible = FALSE; + int c; + /* initial mode setting will not have set a screen yet */ if (!screen) return; @@ -605,7 +607,12 @@ xf86_reload_cursors (ScreenPtr screen) cursor_info = xf86_config->cursor_info; if (!cursor_info) return; - + + /* This avoids enabling the cursor, when a SW cursor is in use. */ + for (c = 0; c < xf86_config->num_crtc; c++) + if (xf86_config->crtc[c]->cursor_shown) + hwcursor_visible = TRUE; + cursor = xf86_config->cursor; GetSpritePosition (&x, &y); if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) @@ -627,7 +634,8 @@ xf86_reload_cursors (ScreenPtr screen) ); (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y); - (*cursor_info->ShowCursor)(cursor_info->pScrn); + if (hwcursor_visible) + (*cursor_info->ShowCursor)(cursor_info->pScrn); } }