[client] kvmfr: report the local window size to the VM
This commit is contained in:
1 parent
9ffb800e93
commit
d839a45d0b
2 files changed
+26
-2
No files matched your search
@@ -190,6 +190,21 @@ bool core_warpPointer(int x, int y, bool exiting)
|
||||
|
||||
void core_updatePositionInfo(void)
|
||||
{
|
||||
if (g_state.kvmfrFeatures & KVMFR_FEATURE_WINDOWSIZE)
|
||||
{
|
||||
const KVMFRWindowSize msg = {
|
||||
.msg.type = KVMFR_MESSAGE_WINDOWSIZE,
|
||||
.w = g_state.windowW,
|
||||
.h = g_state.windowH
|
||||
};
|
||||
|
||||
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)
|
||||
goto done;
|
||||
|
||||
|
||||
@@ -56,14 +56,16 @@ typedef uint32_t KVMFRCursorFlags;
|
||||
|
||||
enum
|
||||
{
|
||||
KVMFR_FEATURE_SETCURSORPOS = 0x1
|
||||
KVMFR_FEATURE_SETCURSORPOS = 0x1,
|
||||
KVMFR_FEATURE_WINDOWSIZE = 0x2
|
||||
};
|
||||
|
||||
typedef uint32_t KVMFRFeatureFlags;
|
||||
|
||||
enum
|
||||
{
|
||||
KVMFR_MESSAGE_SETCURSORPOS
|
||||
KVMFR_MESSAGE_SETCURSORPOS,
|
||||
KVMFR_MESSAGE_WINDOWSIZE
|
||||
};
|
||||
|
||||
typedef uint32_t KVMFRMessageType;
|
||||
@@ -176,6 +178,13 @@ typedef struct KVMFRSetCursorPos
|
||||
}
|
||||
KVMFRSetCursorPos;
|
||||
|
||||
typedef struct KVMFRWindowSize
|
||||
{
|
||||
KVMFRMessage msg;
|
||||
uint32_t w, h;
|
||||
}
|
||||
KVMFRWindowSize;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user