native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #27 from supabitapp/debug-tab-focus-input-routing

Fix input routing to wrong tab after app switch

authored by

khoi and committed by
GitHub
3eb16504 e2052095

+8
+8
supacode/Features/Terminal/Models/WorktreeTerminalState.swift
··· 1 + import AppKit 1 2 import CoreGraphics 2 3 import Foundation 3 4 import GhosttyKit ··· 178 179 179 180 func syncFocus(windowIsKey: Bool) { 180 181 let selectedTabId = tabManager.selectedTabId 182 + var surfaceToFocus: GhosttySurfaceView? 181 183 for (tabId, tree) in trees { 182 184 let focusedId = focusedSurfaceIdByTab[tabId] 183 185 let shouldFocusTab = windowIsKey && tabId == selectedTabId 184 186 for surface in tree.leaves() { 185 187 let isFocused = shouldFocusTab && surface.id == focusedId 186 188 surface.focusDidChange(isFocused) 189 + if isFocused { 190 + surfaceToFocus = surface 191 + } 187 192 } 193 + } 194 + if let surfaceToFocus, surfaceToFocus.window?.firstResponder is GhosttySurfaceView { 195 + surfaceToFocus.window?.makeFirstResponder(surfaceToFocus) 188 196 } 189 197 } 190 198