Skip SetCursor when vtSema is FALSE.

Consider below sequence -
1) Cursor is removed : isUp will be FALSE if HW cursor is set.
2) VT switched away from X : vtSema becomes FALSE.
3) xf86CursorSetCursor is called with non-null CursorPtr :
Saves the passed in CursorPtr, fallbacks to SW cursor and invokes
spriteFuncs->SetCursor which saves the area under cursor and restores
the cursor. This sets isUp to TRUE and as vtSema is FALSE saved data
is garbage.
4) VT switched to X : vtSema becomes TRUE. xf86Cursor enable fb access
is called which will remove the SW cursor, i.e copies saved data in #3
to screen.

This results to momentary garbage data on screen. Hence when !vtSema
skip spriteFuncs->SetCursor.

X.Org Bug 85313 <https://bugs.freedesktop.org/show_bug.cgi?id=85313>

Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Yogish Kulkarni 2014-10-22 12:55:28 +05:30 committed by Keith Packard
parent 839f05329d
commit df6a3a07f6

View File

@ -332,8 +332,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
ScreenPriv->HotX = cursor->bits->xhot;
ScreenPriv->HotY = cursor->bits->yhot;
if (!infoPtr->pScrn->vtSema)
if (!infoPtr->pScrn->vtSema) {
ScreenPriv->SavedCursor = cursor;
return;
}
if (infoPtr->pScrn->vtSema && xorg_list_is_empty(&pScreen->pixmap_dirty_list) &&
(ScreenPriv->ForceHWCursorCount ||