Fix the kitty shell launched via a mapping needlessly requiring :opt:allow_remote_control to be turned on.

This commit is contained in:
Kovid Goyal 2020-06-20 12:43:46 +05:30
parent 601a6c9e3d
commit b15e58621c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 12 additions and 4 deletions

View File

@ -51,6 +51,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- macOS: Notarize the kitty application (:iss:`2040`)
- Fix the kitty shell launched via a mapping needlessly requiring
:opt:`allow_remote_control` to be turned on.
0.17.4 [2020-05-09]
--------------------

View File

@ -948,19 +948,24 @@ def kitty_shell(self, window_type: str) -> None:
if aw is not None:
kw['env'] = {'KITTY_SHELL_ACTIVE_WINDOW_ID': str(aw.id)}
if window_type == 'tab':
self._new_tab(SpecialWindow(cmd, **kw))
tab = self._new_tab(SpecialWindow(cmd, **kw))
if tab is not None:
for w in tab:
w.allow_remote_control = True
elif window_type == 'os_window':
os_window_id = self._new_os_window(SpecialWindow(cmd, **kw))
self.os_window_map[os_window_id]
for tab in self.os_window_map[os_window_id]:
for w in tab:
w.allow_remote_control = True
elif window_type == 'overlay':
tab = self.active_tab
if aw is not None and tab is not None:
kw['overlay_for'] = aw.id
tab.new_special_window(SpecialWindow(cmd, **kw))
tab.new_special_window(SpecialWindow(cmd, **kw), allow_remote_control=True)
else:
tab = self.active_tab
if tab is not None:
tab.new_special_window(SpecialWindow(cmd, **kw))
tab.new_special_window(SpecialWindow(cmd, **kw), allow_remote_control=True)
def switch_focus_to(self, window_id: int) -> None:
tab = self.active_tab