mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +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;
|
uint32_t setPosSerial;
|
||||||
if (lgmpClientSendData(g_state.pointerQueue,
|
LGMP_STATUS status;
|
||||||
&msg, sizeof(msg), &setPosSerial) == LGMP_OK)
|
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 */
|
/* wait for the move request to be processed */
|
||||||
do
|
do
|
||||||
@ -498,6 +504,7 @@ void core_handleMouseNormal(double ex, double ey)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
fallback:
|
||||||
/* add the difference to the offset */
|
/* add the difference to the offset */
|
||||||
ex += guest.x - (g_cursor.guest.x + g_cursor.guest.hx);
|
ex += guest.x - (g_cursor.guest.x + g_cursor.guest.hx);
|
||||||
ey += guest.y - (g_cursor.guest.y + g_cursor.guest.hy);
|
ey += guest.y - (g_cursor.guest.y + g_cursor.guest.hy);
|
||||||
|
Loading…
Reference in New Issue
Block a user