From 24f613cae4147e0e1e770ee22932b6e2fb7064a2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 28 Jul 2016 22:42:28 +0100 Subject: 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 --- src/sna/sna_display.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sna/sna_display.c') diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index b3eb19f7..f10e3402 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -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; -- cgit v1.2.3