aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/tests/mobile.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-16 15:16:45 +0300
committerGitHub <noreply@github.com>2026-09-16 15:16:45 +0300
commitd1a53b2c0e7a365c20a524d75906ae83c6094458 (patch)
tree867b7ffb30c70d60ddad3b20975550dda21ca96f /src/client/shell/tests/mobile.rs
parent18061191fdc019498610aee81f0df93f6c2ebd31 (diff)
fix: keep local usable when remote machines stall (#4234)
refs #3903
Diffstat (limited to 'src/client/shell/tests/mobile.rs')
-rw-r--r--src/client/shell/tests/mobile.rs25
1 files changed, 25 insertions, 0 deletions
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();