mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[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.
This commit is contained in:
parent
dacd0ab844
commit
ada6ada576
@ -342,15 +342,13 @@ static void sendPointer(bool newClient)
|
|||||||
// new clients need the last known shape and current position
|
// new clients need the last known shape and current position
|
||||||
if (newClient)
|
if (newClient)
|
||||||
{
|
{
|
||||||
if (!app.pointerShapeValid)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// update the saved details with the current cursor position
|
// update the saved details with the current cursor position
|
||||||
KVMFRCursor *cursor = lgmpHostMemPtr(app.pointerShape);
|
KVMFRCursor *cursor = lgmpHostMemPtr(app.pointerShape);
|
||||||
cursor->x = app.pointerInfo.x;
|
cursor->x = app.pointerInfo.x;
|
||||||
cursor->y = app.pointerInfo.y;
|
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);
|
(app.pointerInfo.visible ? CURSOR_FLAG_VISIBLE : 0);
|
||||||
|
|
||||||
postPointer(flags, app.pointerShape);
|
postPointer(flags, app.pointerShape);
|
||||||
|
Loading…
Reference in New Issue
Block a user