From 6c0bb273d5d5405a00985621b17e36f8b4d64609 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 2 Sep 2026 14:24:33 +0300 Subject: feat: support independent multi-client tab views (#3526) --- src/kitty_graphics.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/kitty_graphics.rs') diff --git a/src/kitty_graphics.rs b/src/kitty_graphics.rs index 1ce90eb3..37bae34e 100644 --- a/src/kitty_graphics.rs +++ b/src/kitty_graphics.rs @@ -503,20 +503,22 @@ fn collect_visible_placements( uploaded_images: &HashMap, oversized_images: &HashMap, ) -> Vec { - let ws_idx = match app.active { - Some(idx) => idx, - None => { - tracing::debug!("collect_visible_placements: no active workspace"); - return Vec::new(); - } + let Some(target) = surface.target else { + tracing::debug!("collect_visible_placements: no tab surface target"); + return Vec::new(); }; + let ws_idx = target.workspace_index; if app .workspaces .get(ws_idx) - .and_then(crate::workspace::Workspace::active_tab) + .and_then(|workspace| workspace.tabs.get(target.tab_index)) .is_none() { - tracing::debug!(ws_idx, "collect_visible_placements: no active tab"); + tracing::debug!( + ws_idx, + tab_idx = target.tab_index, + "collect_visible_placements: no target tab" + ); return Vec::new(); } -- cgit v1.2.3