From 87b7bc496daa9072acc846d03ace116ced1e793e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 26 Nov 2024 10:07:10 +0100 Subject: Handle "no cursor", not just "empty cursor" Some paths indicate a hidden cursor using NullCursor, and some (most) use a valid cursor that just has no contents. Make sure we can handle both cases. --- unix/xserver/hw/vnc/vncHooks.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c index bb15591f..8384618a 100644 --- a/unix/xserver/hw/vnc/vncHooks.c +++ b/unix/xserver/hw/vnc/vncHooks.c @@ -560,11 +560,9 @@ static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, ret = (*pScreen->DisplayCursor) (pDev, pScreen, cursor); - /* - * XXX DIX calls this function with NULL argument to remove cursor sprite from - * screen. Should we handle this in setCursor as well? - */ - if (cursor != NullCursor) { + if (cursor == NullCursor) { + vncSetCursorSprite(0, 0, 0, 0, NULL); + } else { int width, height; int hotX, hotY; -- cgit v1.2.3