Skip to content

Commit ada6ada

Browse files
committed
[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.
1 parent dacd0ab commit ada6ada

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

host/src/app.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,13 @@ static void sendPointer(bool newClient)
342342
// new clients need the last known shape and current position
343343
if (newClient)
344344
{
345-
if (!app.pointerShapeValid)
346-
return;
347-
348345
// update the saved details with the current cursor position
349346
KVMFRCursor *cursor = lgmpHostMemPtr(app.pointerShape);
350347
cursor->x = app.pointerInfo.x;
351348
cursor->y = app.pointerInfo.y;
352349

353-
const uint32_t flags = CURSOR_FLAG_POSITION | CURSOR_FLAG_SHAPE |
350+
const uint32_t flags = CURSOR_FLAG_POSITION |
351+
(app.pointerShapeValid ? CURSOR_FLAG_SHAPE : 0) |
354352
(app.pointerInfo.visible ? CURSOR_FLAG_VISIBLE : 0);
355353

356354
postPointer(flags, app.pointerShape);

0 commit comments

Comments
 (0)