mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] don't try to realign the mouse until we know where the mouse is
This commit is contained in:
parent
233b7755ae
commit
afff50dfde
@ -50,6 +50,7 @@ struct AppState
|
||||
SDL_Point srcSize;
|
||||
LG_RendererRect dstRect;
|
||||
SDL_Point cursor;
|
||||
bool haveCursorPos;
|
||||
float scaleX, scaleY;
|
||||
|
||||
const LG_Renderer * lgr ;
|
||||
@ -315,6 +316,7 @@ int renderThread(void * unused)
|
||||
{
|
||||
state.cursor.x = header.cursor.x;
|
||||
state.cursor.y = header.cursor.y;
|
||||
state.haveCursorPos = true;
|
||||
}
|
||||
|
||||
if (header.cursor.flags & KVMFR_CURSOR_FLAG_SHAPE)
|
||||
@ -526,7 +528,7 @@ int eventThread(void * arg)
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
if (realignGuest)
|
||||
if (realignGuest && state.haveCursorPos)
|
||||
{
|
||||
x = event.motion.x - state.dstRect.x;
|
||||
y = event.motion.y - state.dstRect.y;
|
||||
|
Loading…
Reference in New Issue
Block a user