From a5a04aaab7baafd53f2c8b75ad1b0c97bc5771da Mon Sep 17 00:00:00 2001 From: yuanyuanxiang <962914132@qq.com> Date: Sat, 30 May 2026 23:41:03 +0200 Subject: [PATCH] fix(web): improve touch double-click reliability across platforms Increase touch move threshold to prevent accidental drag detection. Simulate physical double-click with two sequential click events and a 20ms delay instead of using non-standard dblclick event. Fix folder renaming and unresponsiveness issues on Windows, Linux, and macOS. --- Dependencies.md | 2 ++ server/2015Remote/2015RemoteDlg.cpp | 6 ++++-- server/2015Remote/lang/en_US.ini | 3 ++- server/2015Remote/lang/zh_TW.ini | 3 ++- server/web/index.html | 10 ++++++++-- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Dependencies.md b/Dependencies.md index a8c7c70..b315144 100644 --- a/Dependencies.md +++ b/Dependencies.md @@ -11,6 +11,8 @@ - [jpeg v3.1.1](https://github.com/libjpeg-turbo/libjpeg-turbo) - [opus-1.6.1](https://opus-codec.org/release/stable/2026/01/14/libopus-1_6_1.html) - [libpeconv c7d1e48](https://github.com/hasherezade/libpeconv) +- [libvpl v2.16.0](https://github.com/intel/libvpl) +- [dav1d 62501cc](https://github.com/videolan/dav1d) ## execution diff --git a/server/2015Remote/2015RemoteDlg.cpp b/server/2015Remote/2015RemoteDlg.cpp index 3e6e813..594e013 100644 --- a/server/2015Remote/2015RemoteDlg.cpp +++ b/server/2015Remote/2015RemoteDlg.cpp @@ -1896,7 +1896,8 @@ BOOL CMy2015RemoteDlg::OnInitDialog() Mprintf("[WebService] Admin password configured from %s\n", (webPassEnv && *webPassEnv) ? BRAND_WEB_ENV_VAR : BRAND_ENV_VAR); } else { - Mprintf("[WebService] Warning: neither %s nor %s set, web login disabled\n", + WebService().SetAdminPassword("admin"); + Mprintf("[WebService] Warning: neither %s nor %s set! Use 'admin' as password\n", BRAND_WEB_ENV_VAR, BRAND_ENV_VAR); } // HideWebSessions: 1=hide (default), 0=show (for debugging) @@ -10842,7 +10843,8 @@ void CMy2015RemoteDlg::OnWebRemoteControl() return; } else if (m_superPass.empty()) { - MessageBoxL("请设置环境变量 " BRAND_ENV_VAR " 来使用Web远程桌面!", "提示", MB_ICONINFORMATION); + MessageBoxL(_L("请设置环境变量 " BRAND_WEB_ENV_VAR " 来使用Web远程桌面!") + _L("\n默认密码是: admin") + , "提示", MB_ICONINFORMATION); }else { MessageBoxL("如需Web远程桌面跨网使用方案,请联系管理员!", "提示", MB_ICONINFORMATION); } diff --git a/server/2015Remote/lang/en_US.ini b/server/2015Remote/lang/en_US.ini index 6919b96..3a8955f 100644 --- a/server/2015Remote/lang/en_US.ini +++ b/server/2015Remote/lang/en_US.ini @@ -1772,7 +1772,7 @@ FRPS Web˿Ч!\nЧȨʹWebԶ̼!=Web port set failed!\nA valid authorization is required! WebԶ(&W)=Open Web SimpleRemoter(&W) ڲ˵Web˿!=Please set Web liscening port! -û YAMA_PWD ʹWebԶ!=Please set YAMA_PWD to use Web SimpleRemoter! +û YAMA_WEB_ADMIN_PASS ʹWebԶ!=Please set YAMA_WEB_ADMIN_PASS to use Web SimpleRemoter! WebԶʹ÷ϵԱ!=If you need to use Web SimpleRemoter in WAN, please contact administrator! ; Plugin Settings Dialog - English Translation ; Format: Simplified Chinese=English @@ -1924,3 +1924,4 @@ FRPC Զ =Error ѹ(&C)=&Compress ѹ(&U)=&Uncompress +\nĬ: admin=\nDefault password is: admin \ No newline at end of file diff --git a/server/2015Remote/lang/zh_TW.ini b/server/2015Remote/lang/zh_TW.ini index 163a7ac..eb42ba1 100644 --- a/server/2015Remote/lang/zh_TW.ini +++ b/server/2015Remote/lang/zh_TW.ini @@ -1764,7 +1764,7 @@ FRPS ˿ںWeb˿ڳͻ!=˿ںWeb˿ڳͻ! WebԶ(&W)=WebԶ(&W) ڲ˵Web˿!=ڲ˵Web˿! -û YAMA_PWD ʹWebԶ!=û YAMA_PWD ʹWebԶ! +û YAMA_WEB_ADMIN_PASS ʹWebԶ!=û YAMA_WEB_ADMIN_PASS ʹWebԶ! WebԶʹ÷ϵԱ!=WebԶʹ÷ϵԱ! ; Plugin Settings Dialog - Traditional Chinese Translation ; Format: Simplified Chinese=Traditional Chinese @@ -1915,3 +1915,4 @@ FRPC Զ =e` ѹ(&C)=s(&C) ѹ(&U)=≺s(&U) +\nĬ: admin=\nĬ: admin diff --git a/server/web/index.html b/server/web/index.html index bb14b92..3ec69d5 100644 --- a/server/web/index.html +++ b/server/web/index.html @@ -3129,7 +3129,7 @@ const totalDist = Math.sqrt(totalDx * totalDx + totalDy * totalDy); // Different thresholds for different states - const moveThreshold = (touchState.state === T_SECOND_DOWN) ? 10 : 20; + const moveThreshold = (touchState.state === T_SECOND_DOWN) ? 22 : 20; if (totalDist > moveThreshold && !touchState.moved) { touchState.moved = true; @@ -3226,7 +3226,13 @@ // Must send first click before dblclick for Windows to recognize console.log('[Touch] Double click'); clickAtCursor(0); // First click - dblClickAtCursor(); // Then double click + // dblClickAtCursor(); // Then double click + // 强制人工延迟 20 毫秒发送第二次标准单击 + // 这 20ms 的延迟在操作上完全感觉不到,但对远程桌面的网络和操作系统驱动至关重要! + // 它能完美地把两次点击在时间线上拉开,让任何操作系统都 100% 判定这是标准的“物理鼠标双击”。 + setTimeout(() => { + clickAtCursor(0); + }, 20); touchState.state = T_IDLE; } else if (touchState.state === T_FIRST_DOWN && !touchState.moved) { // First tap released without moving = single click