mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-26 00:26:32 +00:00
[client] core: fix dynamic res switch race issue
This commit is contained in:
parent
cb423730e4
commit
868504d22d
@ -190,19 +190,27 @@ 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)
|
||||||
{
|
{
|
||||||
const KVMFRWindowSize msg = {
|
static unsigned lastW = 0, lastH = 0;
|
||||||
.msg.type = KVMFR_MESSAGE_WINDOWSIZE,
|
if (lastW != g_state.windowW || lastH != g_state.windowH)
|
||||||
.w = g_state.windowW,
|
{
|
||||||
.h = g_state.windowH
|
lastW = g_state.windowW;
|
||||||
};
|
lastH = g_state.windowH;
|
||||||
|
|
||||||
uint32_t serial;
|
const KVMFRWindowSize msg = {
|
||||||
LGMP_STATUS status;
|
.msg.type = KVMFR_MESSAGE_WINDOWSIZE,
|
||||||
if ((status = lgmpClientSendData(g_state.pointerQueue,
|
.w = g_state.windowW,
|
||||||
&msg, sizeof(msg), &serial)) != LGMP_OK)
|
.h = g_state.windowH
|
||||||
DEBUG_WARN("Message send failed: %s", lgmpStatusString(status));
|
};
|
||||||
|
|
||||||
|
uint32_t serial;
|
||||||
|
LGMP_STATUS status;
|
||||||
|
if ((status = lgmpClientSendData(g_state.pointerQueue,
|
||||||
|
&msg, sizeof(msg), &serial)) != LGMP_OK)
|
||||||
|
DEBUG_WARN("Message send failed: %s", lgmpStatusString(status));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_state.haveSrcSize)
|
if (!g_state.haveSrcSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user