diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-19 04:43:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-19 04:43:28 +0300 |
| commit | a5c69beabfc82d9c3f9563eb821139b2e0f3e14f (patch) | |
| tree | 9b7049e4629913dcab40d985df399acee262b67b /src/app/state.rs | |
| parent | 3667151744e379ac5c8f76d57203b675de8a6ebc (diff) | |
fix(perf): eliminate redundant terminal wake work (#2962)
* fix(perf): eliminate redundant terminal wake work
* fix(perf): harden release benchmark gate
* test(perf): strengthen performance guardrails
Diffstat (limited to 'src/app/state.rs')
| -rw-r--r-- | src/app/state.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/app/state.rs b/src/app/state.rs index b8205451..d9dcfc9d 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -1614,6 +1614,26 @@ impl AppState { section == SettingsSection::Integrations && self.integration_updates_available() } + pub(crate) fn app_surface_pane_ids(&self) -> std::collections::HashSet<PaneId> { + let mut pane_ids = std::collections::HashSet::new(); + if let Some(popup) = &self.popup_pane { + pane_ids.insert(popup.pane_id); + } + let Some(tab) = self + .active + .and_then(|ws_idx| self.workspaces.get(ws_idx)) + .and_then(crate::workspace::Workspace::active_tab) + else { + return pane_ids; + }; + if tab.zoomed { + pane_ids.insert(tab.layout.focused()); + } else { + pane_ids.extend(tab.panes.keys().copied()); + } + pane_ids + } + pub(crate) fn focused_pane_requests_mouse_capture_from( &self, terminal_runtimes: &crate::terminal::TerminalRuntimeRegistry, @@ -1622,8 +1642,7 @@ impl AppState { && self .active .and_then(|idx| self.focused_runtime_in_workspace(terminal_runtimes, idx)) - .and_then(crate::terminal::TerminalRuntime::input_state) - .is_some_and(crate::pane::InputState::mouse_reporting_enabled) + .is_some_and(crate::terminal::TerminalRuntime::mouse_reporting_enabled) } pub(crate) fn should_capture_host_mouse_from( |
