From ada6ada576dd7c920dfe0b201430a64692f1fd87 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 6 Jul 2021 09:53:42 +1000 Subject: [PATCH] [host] app: always send the cursor position to the client If the guest VM is not showing a cursor when it starts such as on the Windows login screen, the client never gets the current position of the cursor, which prevents the client from attempting to send mouse movements. This change ensures the client gets the mouse location on startup. --- host/src/app.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/host/src/app.c b/host/src/app.c index 77464ea7..01953d4c 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -342,15 +342,13 @@ static void sendPointer(bool newClient) // new clients need the last known shape and current position if (newClient) { - if (!app.pointerShapeValid) - return; - // update the saved details with the current cursor position KVMFRCursor *cursor = lgmpHostMemPtr(app.pointerShape); cursor->x = app.pointerInfo.x; cursor->y = app.pointerInfo.y; - const uint32_t flags = CURSOR_FLAG_POSITION | CURSOR_FLAG_SHAPE | + const uint32_t flags = CURSOR_FLAG_POSITION | + (app.pointerShapeValid ? CURSOR_FLAG_SHAPE : 0) | (app.pointerInfo.visible ? CURSOR_FLAG_VISIBLE : 0); postPointer(flags, app.pointerShape);