diff --git a/kitty/child.py b/kitty/child.py index 9e5ce5d79..aedc33873 100644 --- a/kitty/child.py +++ b/kitty/child.py @@ -223,10 +223,8 @@ class Child: stdin: Optional[bytes] = None, env: Optional[Dict[str, str]] = None, cwd_from: Optional['CwdRequest'] = None, - allow_remote_control: bool = False, is_clone_launch: str = '', ): - self.allow_remote_control = allow_remote_control self.is_clone_launch = is_clone_launch self.argv = list(argv) if cwd_from: diff --git a/kitty/tabs.py b/kitty/tabs.py index 2e917c9bf..00ddc0395 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -366,7 +366,6 @@ class Tab: # {{{ cwd_from: Optional[CwdRequest] = None, cwd: Optional[str] = None, env: Optional[Dict[str, str]] = None, - allow_remote_control: bool = False, is_clone_launch: str = '', ) -> Child: check_for_suitability = True @@ -416,7 +415,7 @@ class Tab: # {{{ pwid = platform_window_id(self.os_window_id) if pwid is not None: fenv['WINDOWID'] = str(pwid) - ans = Child(cmd, cwd or self.cwd, stdin, fenv, cwd_from, allow_remote_control=allow_remote_control, is_clone_launch=is_clone_launch) + ans = Child(cmd, cwd or self.cwd, stdin, fenv, cwd_from, is_clone_launch=is_clone_launch) ans.fork() return ans @@ -444,13 +443,14 @@ class Tab: # {{{ is_clone_launch: str = '', ) -> Window: child = self.launch_child( - use_shell=use_shell, cmd=cmd, stdin=stdin, cwd_from=cwd_from, cwd=cwd, env=env, allow_remote_control=allow_remote_control, + use_shell=use_shell, cmd=cmd, stdin=stdin, cwd_from=cwd_from, cwd=cwd, env=env, is_clone_launch=is_clone_launch ) window = Window( self, child, self.args, override_title=override_title, - copy_colors_from=copy_colors_from, watchers=watchers + copy_colors_from=copy_colors_from, watchers=watchers, ) + window.allow_remote_control = allow_remote_control # Must add child before laying out so that resize_pty succeeds get_boss().add_child(window) self._add_window(window, location=location, overlay_for=overlay_for, overlay_behind=overlay_behind) diff --git a/kitty/window.py b/kitty/window.py index bee2e9f63..d9a6a5e02 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -462,6 +462,7 @@ global_watchers = GlobalWatchers() class Window: window_custom_type: str = '' + allow_remote_control: bool = False def __init__( self, @@ -495,7 +496,6 @@ class Window: self.default_title = os.path.basename(child.argv[0] or appname) self.child_title = self.default_title self.title_stack: Deque[str] = deque(maxlen=10) - self.allow_remote_control = child.allow_remote_control self.id: int = add_window(tab.os_window_id, tab.id, self.title) self.margin = EdgeWidths() self.padding = EdgeWidths()