From eeb772ad07c68a3993ae398eafcfe5744713b14e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 13 Dec 2022 20:15:21 +0530 Subject: [PATCH] @launch: When an overlay window is specified in a particular tab via --match use the active window of that tab as the base, not the current tab. Fixes #5768 --- kitty/launch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kitty/launch.py b/kitty/launch.py index 49cc650f7..8261b3bc9 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -548,8 +548,11 @@ def launch( kw['cmd'] = final_cmd if force_window_launch and opts.type not in non_window_launch_types: opts.type = 'window' - if opts.type in ('overlay', 'overlay-main') and active: - kw['overlay_for'] = active.id + base_for_overlay = active + if target_tab: + base_for_overlay = target_tab.active_window + if opts.type in ('overlay', 'overlay-main') and base_for_overlay: + kw['overlay_for'] = base_for_overlay.id if opts.type == 'background': cmd = kw['cmd'] if not cmd: