mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] core: fallback to manual realignment if the LGMP message fails
This commit is contained in:
parent
3ffefb5281
commit
0fc87576f3
@ -468,8 +468,14 @@ void core_handleMouseNormal(double ex, double ey)
|
||||
};
|
||||
|
||||
uint32_t setPosSerial;
|
||||
if (lgmpClientSendData(g_state.pointerQueue,
|
||||
&msg, sizeof(msg), &setPosSerial) == LGMP_OK)
|
||||
LGMP_STATUS status;
|
||||
if ((status = lgmpClientSendData(g_state.pointerQueue,
|
||||
&msg, sizeof(msg), &setPosSerial)) != LGMP_OK)
|
||||
{
|
||||
DEBUG_WARN("Message send failed: %s", lgmpStatusString(status));
|
||||
goto fallback;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* wait for the move request to be processed */
|
||||
do
|
||||
@ -498,6 +504,7 @@ void core_handleMouseNormal(double ex, double ey)
|
||||
}
|
||||
else
|
||||
{
|
||||
fallback:
|
||||
/* add the difference to the offset */
|
||||
ex += guest.x - (g_cursor.guest.x + g_cursor.guest.hx);
|
||||
ey += guest.y - (g_cursor.guest.y + g_cursor.guest.hy);
|
||||
|
Loading…
Reference in New Issue
Block a user