mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-12-04 15:46:07 +00:00
fix(mobile): keep the mouse-mode virtual mouse inside the canvas gesture region
Holding a virtual left/right button while another finger drags relies on the canvas recognizer seeing both pointers: it then takes the isSpecialHoldDragActive branch of onTwoFingerScaleUpdate. With the virtual mouse moved above the key bar and out of the region, the recognizer saw only the dragging finger, routed it through onOneFingerPanUpdate, and any movement of the holding finger set blockEvents and froze the drag while the remote button stayed down. Put FloatingMouseWidgets back where master has it; the cursor and the touch-mode virtual mouse stay above the bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
This commit is contained in:
1 parent
111f1936f0
commit
f6ff4a7108
1 file changed
+9
-5
@@ -715,7 +715,8 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
|
||||
// The key bar sits above the canvas, outside its gesture region: a touch on the bar must not
|
||||
// also reach the canvas recognizers, which would send it to the remote as a mouse event.
|
||||
// The cursor and the virtual mouse stay above the bar, as they were inside the canvas stack.
|
||||
// The cursor and the touch-mode virtual mouse stay above the bar, as they were inside the canvas
|
||||
// stack. The mouse-mode virtual mouse stays inside the region: see getBodyForMobile.
|
||||
Widget withKeyHelpTools(Widget body) => Stack(children: [
|
||||
Positioned.fill(child: body),
|
||||
Obx(() {
|
||||
@@ -730,10 +731,6 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
if (gFFI.ffiModel.touchMode)
|
||||
FloatingMouse(
|
||||
ffi: gFFI,
|
||||
)
|
||||
else
|
||||
FloatingMouseWidgets(
|
||||
ffi: gFFI,
|
||||
),
|
||||
]);
|
||||
|
||||
@@ -779,6 +776,13 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
|
||||
).workaroundFreezeLinuxMint(),
|
||||
),
|
||||
];
|
||||
// Holding a virtual button while another finger drags needs both pointers in the canvas
|
||||
// recognizers (isSpecialHoldDragActive), so these stay inside the gesture region.
|
||||
if (!gFFI.ffiModel.touchMode) {
|
||||
paints.add(FloatingMouseWidgets(
|
||||
ffi: gFFI,
|
||||
));
|
||||
}
|
||||
return paints;
|
||||
}()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user