sna: Hide the hardware cursor when switching back after an error

If the kernel complains when trying to move the cursor, we disable the
hwcursor and switch to swcursor. However, if the kernel is still showing
the hwcursor we end up with multiple visible cursors. Attempt to disable
the hwcursor (that may or may not work) as we switch over.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-07-28 22:42:28 +01:00
parent 8bfac0f21a
commit 24f613cae4
1 changed files with 2 additions and 0 deletions

View File

@ -5842,6 +5842,8 @@ static void __restore_swcursor(ScrnInfoPtr scrn)
static void restore_swcursor(struct sna *sna)
{
sna->cursor.info->HideCursor(sna->scrn);
/* XXX Force the cursor to be restored (avoiding recursion) */
FreeCursor(sna->cursor.ref, None);
sna->cursor.ref = NULL;