allow_remote_control should be per window not per child
This commit is contained in:
parent
1619687d1d
commit
814dd8a275
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user