macOS: Fix unable to open new tab/window when there is no OS window

This commit is contained in:
pagedown
2022-07-14 18:25:00 +08:00
parent b0666c9180
commit 512db660a1
3 changed files with 10 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ instead of the active tab
tabs = self.tabs_for_match_payload(boss, window, payload_get)
if tabs and tabs[0]:
target_tab = tabs[0]
elif payload_get('type') not in ('os-window', 'background'):
elif payload_get('type') not in ('background', 'os-window', 'tab', 'window'):
return None
w = do_launch(boss, opts, payload_get('args') or [], target_tab=target_tab)
return None if payload_get('no_response') else str(getattr(w, 'id', 0))