diff options
Diffstat (limited to 'src/client/shell/composition.rs')
| -rw-r--r-- | src/client/shell/composition.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/client/shell/composition.rs b/src/client/shell/composition.rs index 10dc6633..4da21e77 100644 --- a/src/client/shell/composition.rs +++ b/src/client/shell/composition.rs @@ -40,6 +40,12 @@ impl ClientShellState { .navigate_workspace_id .as_ref() .is_some_and(|target| self.navigation_target_valid(target)); + let pending_workspace_highlight = + self.pending_workspace_highlight.as_ref().filter(|pending| { + self.mode != ClientShellMode::Navigate + && pending.target.endpoint_id == self.active_endpoint_id + && self.navigation_target_valid(&pending.target) + }); // A resize invalidates pane geometry, not the healthy Local workspace chrome. let local_snapshot = self.snapshot.as_deref().filter(|_| { self.endpoints.len() == 1 @@ -65,7 +71,8 @@ impl ClientShellState { selected_workspace_id: self .navigate_workspace_id .as_ref() - .filter(|_| valid_navigation_target), + .filter(|_| valid_navigation_target) + .or_else(|| pending_workspace_highlight.map(|pending| &pending.target)), reveal_navigation_workspace: &mut self.reveal_navigation_workspace, dragged_workspace_id: None, workspace_drop_indicator_row: None, @@ -143,6 +150,12 @@ impl ClientShellState { .navigate_workspace_id .as_ref() .is_some_and(|target| self.navigation_target_valid(target)); + let pending_workspace_highlight = + self.pending_workspace_highlight.as_ref().filter(|pending| { + self.mode != ClientShellMode::Navigate + && pending.target.endpoint_id == self.active_endpoint_id + && self.navigation_target_valid(&pending.target) + }); if self.snapshot.is_none() || self.pane_surface.is_none() { return Some(self.compose_unavailable(cols, rows)); } @@ -200,7 +213,8 @@ impl ClientShellState { selected_workspace_id: self .navigate_workspace_id .as_ref() - .filter(|_| valid_navigation_target), + .filter(|_| valid_navigation_target) + .or_else(|| pending_workspace_highlight.map(|pending| &pending.target)), reveal_navigation_workspace: &mut self.reveal_navigation_workspace, dragged_workspace_id, workspace_drop_indicator_row, |
