Fix(server): require left-button drag for desktop control of Android

桌面端(非触摸)控制 Android TV/盒子时,鼠标悬停会被客户端翻译成焦点移动,
鼠标划过画面就改变焦点。改为只在按住左键拖动时控制;触摸浏览器行为不变。

- MFC 主控:按 clientID 在主连接上解析并缓存客户端类型(新增线程安全的
  GetHostClientType,类型值在 m_cs 内读取);APK 主机的 WM_MOUSEMOVE 仅在
  MK_LBUTTON 按下时转发,不再每次移动都查主连接。
- Web 控制台:桌面 mousemove 对 Android 主机(优先使用服务端 isAndroidRemote,
  设备 os/clientType 只作兜底)只在左键按下时发 move;检查放在发送节流之后。
  touchstart/touchmove/touchend 未改动,触摸屏的单指移动、点按、拖拽、滚动
  和边缘手势保持原状。
- 安卓客户端未修改:TV 模式仍把带按键的 move 翻译成焦点导航,触摸浏览器
  发出的不带按键 move 继续可用。

验证:MFC Debug 服务端、Go 服务端构建通过;内联 JS 通过 node --check。

Model: deepseek-flash
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
yuanyuanxiangandClaude Code committed 2026-11-19 21:57:38 +01:00
1 parent 1320bb81a6
commit d6ea5fddea
5 files changed
+50

No files matched your search

+16
View File
@@ -13580,6 +13580,22 @@ context* CMy2015RemoteDlg::FindHostByClientID(uint64_t clientID)
return ctx;
}
bool CMy2015RemoteDlg::GetHostClientType(uint64_t clientID, CString& clientType)
{
clientType.Empty();
bool found = false;
EnterCriticalSection(&m_cs);
auto it = m_ClientIndex.find(clientID);
if (it != m_ClientIndex.end() && it->second < m_HostList.size()) {
if (context* ctx = m_HostList[it->second]) {
clientType = ctx->GetAdditionalData(RES_CLIENT_TYPE);
found = true;
}
}
LeaveCriticalSection(&m_cs);
return found;
}
uint64_t CMy2015RemoteDlg::FindClientIDByIP(const std::string& ip)
{
CString clientIP(ip.c_str());