Fix: Web remote desktop reliability and UX

- Server: clamp web session adaptive quality to H264-only levels (>=Good) in EvaluateQuality and ApplyQualityLevel; Ultra/High (DIFF/RGB565) caused the browser to freeze ~1 min into a session
- Server: move session-type detection to the top of ScreenSpyDlg::OnInitDialog and skip SetWindowPlacement/EnterFullScreen for hidden web sessions, eliminating the MFC dialog flash on web-triggered opens
- Linux client: default QualityLevel from QUALITY_ADAPTIVE to QUALITY_GOOD to match Windows/macOS so the server's adaptive controller doesn't auto-upgrade to non-H264 algorithms
- Web: clear the floating quick-action toolbar on fullscreen exit so its row of buttons (RDP reset / Mouse / Close) doesn't stay pinned to the top of the page
- Web: route F11 to the remote in control mode instead of toggling local fullscreen
- Web: route Esc to the remote in control mode via the Keyboard Lock API instead of exiting native fullscreen
This commit is contained in:
yuanyuanxiang
2026-05-19 18:06:41 +02:00
parent d757c33bcb
commit cd43caafb2
8 changed files with 135 additions and 46 deletions

View File

@@ -33,7 +33,9 @@ CFileManager::CFileManager(CClientSocket *pClient, int h, void* user):CManager(p
// 初始化V2文件传输模块
CKernelManager* main = (CKernelManager*)pClient->GetMain();
InitFileUpload({}, main ? main->m_LoginMsg : pClient->m_LoginMsg,
m_Signature = main ? main->m_LoginSignature : pClient->m_LoginSignature;
if (!m_Signature.empty())
InitFileUpload({}, main ? main->m_LoginMsg : pClient->m_LoginMsg,
main ? main->m_LoginSignature : pClient->m_LoginSignature, 64, 50, Logf);
// 发送驱动器列表, 开始进行文件管理,建立新线程
@@ -48,7 +50,8 @@ CFileManager::~CFileManager()
SAFE_CLOSE_HANDLE(m_hSearchThread);
}
m_UploadList.clear();
UninitFileUpload();
if (!m_Signature.empty())
UninitFileUpload();
}

View File

@@ -35,6 +35,7 @@ private:
UINT m_nTransferMode;
char m_strCurrentProcessFileName[MAX_PATH]; // 当前正在处理的文件
__int64 m_nCurrentProcessFileLength; // 当前正在处理的文件的长度
std::string m_Signature;
bool MakeSureDirectoryPathExists(LPCTSTR pszDirPath);
bool UploadToRemote(LPBYTE lpBuffer);
void UploadToRemoteV2(LPBYTE lpBuffer, UINT nSize);

View File

@@ -100,7 +100,8 @@ CScreenManager::CScreenManager(IOCPClient* ClientObject, int n, void* user, BOOL
extern ClientApp g_MyApp;
SetConnection(g_MyApp.g_Connection); // 同时设置 m_conn 和 m_MyClientID
CKernelManager* main = (CKernelManager*)ClientObject->GetMain();
InitFileUpload({}, main ? main->m_LoginMsg : ClientObject->m_LoginMsg,
m_Signature = main ? main->m_LoginSignature : ClientObject->m_LoginSignature;
if (!m_Signature.empty()) InitFileUpload({}, main ? main->m_LoginMsg : ClientObject->m_LoginMsg,
main ? main->m_LoginSignature : ClientObject->m_LoginSignature, 64, 50, Logf);
#endif
m_isGDI = TRUE;
@@ -718,7 +719,8 @@ VOID CScreenManager::SendBitMapInfo()
CScreenManager::~CScreenManager()
{
Mprintf("ScreenManager 析构函数\n");
UninitFileUpload();
if (!m_Signature.empty())
UninitFileUpload();
m_bIsWorking = FALSE;
m_bAudioThreadRunning = FALSE; // 停止音频线程

View File

@@ -90,7 +90,7 @@ public:
uint64_t m_nReconnectTime = 0; // 重连开始时间
uint64_t m_DlgID = 0;
BOOL m_SendFirst = FALSE;
std::string m_Signature;
// 虚拟桌面
BOOL m_virtual;
POINT m_point;