diff --git a/macos/InputHandler.mm b/macos/InputHandler.mm index e4f8901..ddcbbc8 100644 --- a/macos/InputHandler.mm +++ b/macos/InputHandler.mm @@ -217,9 +217,9 @@ void InputHandler::handleMouseWheel(int delta) { // Convert Windows wheel delta (120 = one notch) to macOS pixel units // Using pixel units provides smoother scrolling than line units - // Windows: 120 = one standard notch - // macOS: approximately 10 pixels per notch feels natural - int32_t scrollAmount = (delta * 10) / 120; + // Windows: 120 = one standard notch (~3 lines * 20px = ~60px) + // macOS: 40 pixels per notch matches Windows scroll feel + int32_t scrollAmount = (delta * 40) / 120; // Use pixel units for smoother scrolling experience CGEventRef event = CGEventCreateScrollWheelEvent( diff --git a/server/2015Remote/WebService.cpp b/server/2015Remote/WebService.cpp index 091ffee..5b4a92c 100644 --- a/server/2015Remote/WebService.cpp +++ b/server/2015Remote/WebService.cpp @@ -1600,6 +1600,9 @@ std::string CWebService::BuildDeviceListJson(const std::string& username) { device["screen"] = AnsiToUtf8(resolution); // e.g. "2:3840x1080" } + CString clientType = ctx->GetAdditionalData(RES_CLIENT_TYPE); + device["clientType"] = AnsiToUtf8(clientType); // e.g. "MAC", "LNX", "EXE" + res["devices"].append(device); } LeaveCriticalSection(&m_pParentDlg->m_cs); diff --git a/server/web/index.html b/server/web/index.html index d63e7f0..545352e 100644 --- a/server/web/index.html +++ b/server/web/index.html @@ -3667,13 +3667,15 @@ // Must send first click before dblclick for Windows to recognize console.log('[Touch] Double click'); clickAtCursor(0); // First click - // dblClickAtCursor(); // Then double click - // 强制人工延迟 20 毫秒发送第二次标准单击 - // 这 20ms 的延迟在操作上完全感觉不到,但对远程桌面的网络和操作系统驱动至关重要! - // 它能完美地把两次点击在时间线上拉开,让任何操作系统都 100% 判定这是标准的“物理鼠标双击”。 - setTimeout(() => { - clickAtCursor(0); - }, 20); + if (currentDevice && currentDevice.clientType === 'MAC') { + // macOS uses a real dblclick event; two sequential clicks don't work + dblClickAtCursor(); // Then double click + } else { + // Windows/Linux: simulate physical double-click with two clicks 20ms apart + setTimeout(() => { + clickAtCursor(0); + }, 20); + } touchState.state = T_IDLE; } else if (touchState.state === T_FIRST_DOWN && !touchState.moved) { // First tap released without moving = single click