aboutsummaryrefslogtreecommitdiff
path: root/src/kitty_graphics.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-02 14:24:33 +0300
committerGitHub <noreply@github.com>2026-09-02 14:24:33 +0300
commit6c0bb273d5d5405a00985621b17e36f8b4d64609 (patch)
treeceef5ea8adf337bf3c1e977b133e76cb763c6f1b /src/kitty_graphics.rs
parentcc88b3b8e5bb9f7d9f23ed6ae85a52fd7b5b9ed6 (diff)
feat: support independent multi-client tab views (#3526)
Diffstat (limited to 'src/kitty_graphics.rs')
-rw-r--r--src/kitty_graphics.rs18
1 files changed, 10 insertions, 8 deletions
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<u32, ImageSignature>,
oversized_images: &HashMap<HostSourceKey, ImageSignature>,
) -> Vec<HostPlacement> {
- 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();
}