Fix: Ensure MFC and Web remote desktop sessions are fully independent

This commit is contained in:
yuanyuanxiang
2026-05-02 13:56:08 +02:00
parent 171fa750e5
commit 9ae5529458
8 changed files with 163 additions and 45 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <imm.h>
#include <map>
#include <atomic>
#include "IOCPServer.h"
#include "..\..\client\CursorInfo.h"
#include "VideoDlg.h"
@@ -153,6 +154,10 @@ public:
return TRUE;
}
// Check if this dialog was created by Web request (shared by Web users)
bool IsWebSession() const { return m_bIsWebSession.load(); }
void SetWebSession(bool isWeb) { m_bIsWebSession.store(isWeb); }
VOID SendNext(void);
VOID OnReceiveComplete();
HDC m_hFullDC;
@@ -186,6 +191,7 @@ public:
int m_FrameID;
HIMC m_hOldIMC = NULL; // 保存原始 IME 上下文,控制模式切换时使用
bool m_bHide = false;
std::atomic<bool> m_bIsWebSession{false}; // True if this dialog was created by Web request (atomic for thread safety)
std::string m_strSaveNotice; // 截图保存路径提示
ULONGLONG m_nSaveNoticeTime = 0; // 截图提示开始时间
BOOL m_bUsingFRP = FALSE;