From d1a53b2c0e7a365c20a524d75906ae83c6094458 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 16 Sep 2026 15:16:45 +0300 Subject: fix: keep local usable when remote machines stall (#4234) refs #3903 --- src/client/shell/tests/mobile.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/client/shell/tests/mobile.rs') diff --git a/src/client/shell/tests/mobile.rs b/src/client/shell/tests/mobile.rs index 0c6f1908..4dac5490 100644 --- a/src/client/shell/tests/mobile.rs +++ b/src/client/shell/tests/mobile.rs @@ -119,6 +119,31 @@ fn mobile_switcher_can_activate_an_online_saved_machine() { }] if activated == &endpoint_id )); + // Local is still projected until the remote handoff completes. + state.mode = ClientShellMode::Navigate; + state.compose(44, 30).unwrap(); + let local = state + .hits + .mobile_targets + .iter() + .find_map(|(rect, target)| { + matches!(target, ClientMobileTarget::Machine(ClientEndpointId::Local)).then_some(*rect) + }) + .unwrap(); + let outcome = state.handle_raw_events(vec![RawInputEvent::Mouse(MouseEvent { + kind: MouseEventKind::Down(MouseButton::Left), + column: local.x, + row: local.y, + modifiers: KeyModifiers::empty(), + })]); + assert!(matches!( + outcome.actions.as_slice(), + [ClientShellAction::ActivateEndpoint { + endpoint_id: ClientEndpointId::Local, + target: None, + }] + )); + state.set_endpoint_status(&endpoint_id, ClientEndpointStatus::Online); assert!(state.activate_endpoint_projection(&endpoint_id)); let mut remote_surface = surface(); -- cgit v1.2.3