diff options
author | Yogish Kulkarni <yogishk@nvidia.com> | 2014-10-22 12:55:28 +0530 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-10-27 13:36:20 -0700 |
commit | df6a3a07f60c40bab2b59b9b3ba0c20c8fb7e95d (patch) | |
tree | 9c1443534e502d70c240c6090249085cb91008f7 /hw | |
parent | 839f05329ddb6f9b5b988edf3a2c3a1f856727f7 (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/ramdac/xf86Cursor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index fac682210..4ff1b59b2 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -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 || |