DRYer
This commit is contained in:
parent
d0c50248ea
commit
5ffc4c6498
@ -1607,26 +1607,25 @@ class Boss:
|
|||||||
tab = self._new_tab(SpecialWindow(cmd, **kw))
|
tab = self._new_tab(SpecialWindow(cmd, **kw))
|
||||||
if tab is not None:
|
if tab is not None:
|
||||||
for w in tab:
|
for w in tab:
|
||||||
w.allow_remote_control = True
|
|
||||||
window = w
|
window = w
|
||||||
elif window_type == 'os_window':
|
elif window_type == 'os_window':
|
||||||
os_window_id = self._new_os_window(SpecialWindow(cmd, **kw))
|
os_window_id = self._new_os_window(SpecialWindow(cmd, **kw))
|
||||||
for tab in self.os_window_map[os_window_id]:
|
for tab in self.os_window_map[os_window_id]:
|
||||||
for w in tab:
|
for w in tab:
|
||||||
w.allow_remote_control = True
|
|
||||||
window = w
|
window = w
|
||||||
elif window_type == 'overlay':
|
elif window_type == 'overlay':
|
||||||
tab = self.active_tab
|
tab = self.active_tab
|
||||||
if aw is not None and tab is not None:
|
if aw is not None and tab is not None:
|
||||||
kw['overlay_for'] = aw.id
|
kw['overlay_for'] = aw.id
|
||||||
window = tab.new_special_window(SpecialWindow(cmd, **kw), allow_remote_control=True)
|
window = tab.new_special_window(SpecialWindow(cmd, **kw))
|
||||||
else:
|
else:
|
||||||
tab = self.active_tab
|
tab = self.active_tab
|
||||||
if tab is not None:
|
if tab is not None:
|
||||||
window = tab.new_special_window(SpecialWindow(cmd, **kw), allow_remote_control=True)
|
window = tab.new_special_window(SpecialWindow(cmd, **kw))
|
||||||
|
|
||||||
path, ext = os.path.splitext(logo_png_file)
|
path, ext = os.path.splitext(logo_png_file)
|
||||||
window.set_logo(f'{path}-128{ext}', position='bottom-right', alpha=0.25)
|
window.set_logo(f'{path}-128{ext}', position='bottom-right', alpha=0.25)
|
||||||
|
window.allow_remote_control = True
|
||||||
|
|
||||||
def switch_focus_to(self, window_id: int) -> None:
|
def switch_focus_to(self, window_id: int) -> None:
|
||||||
tab = self.active_tab
|
tab = self.active_tab
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user