mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-29 01:56:27 +00:00
[client] core: fix dynamic res switch race issue
This commit is contained in:
parent
cb423730e4
commit
868504d22d
@ -190,8 +190,15 @@ bool core_warpPointer(int x, int y, bool exiting)
|
|||||||
|
|
||||||
void core_updatePositionInfo(void)
|
void core_updatePositionInfo(void)
|
||||||
{
|
{
|
||||||
if (g_state.kvmfrFeatures & KVMFR_FEATURE_WINDOWSIZE)
|
if (g_state.pointerQueue &&
|
||||||
|
g_state.kvmfrFeatures & KVMFR_FEATURE_WINDOWSIZE)
|
||||||
{
|
{
|
||||||
|
static unsigned lastW = 0, lastH = 0;
|
||||||
|
if (lastW != g_state.windowW || lastH != g_state.windowH)
|
||||||
|
{
|
||||||
|
lastW = g_state.windowW;
|
||||||
|
lastH = g_state.windowH;
|
||||||
|
|
||||||
const KVMFRWindowSize msg = {
|
const KVMFRWindowSize msg = {
|
||||||
.msg.type = KVMFR_MESSAGE_WINDOWSIZE,
|
.msg.type = KVMFR_MESSAGE_WINDOWSIZE,
|
||||||
.w = g_state.windowW,
|
.w = g_state.windowW,
|
||||||
@ -204,6 +211,7 @@ void core_updatePositionInfo(void)
|
|||||||
&msg, sizeof(msg), &serial)) != LGMP_OK)
|
&msg, sizeof(msg), &serial)) != LGMP_OK)
|
||||||
DEBUG_WARN("Message send failed: %s", lgmpStatusString(status));
|
DEBUG_WARN("Message send failed: %s", lgmpStatusString(status));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!g_state.haveSrcSize)
|
if (!g_state.haveSrcSize)
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user