diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-07-12 21:56:06 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-07-12 22:07:22 +0200 |
commit | 3d6125cf15e6cb34409f13910efbb68014c8ac4c (patch) | |
tree | 88243f051957191836e173865738926b9488784c | |
parent | 4675e05cae98e539f0d8e19be3b58c74ec4858ec (diff) | |
download | qutebrowser-3d6125cf15e6cb34409f13910efbb68014c8ac4c.tar.gz qutebrowser-3d6125cf15e6cb34409f13910efbb68014c8ac4c.zip |
Shut down tabs properly when a window is closed
(cherry picked from commit d0ae9ba232ea0d71de1a3fcd2817274a1d1c3a7e)
-rw-r--r-- | qutebrowser/mainwindow/mainwindow.py | 2 | ||||
-rw-r--r-- | qutebrowser/mainwindow/tabbedbrowser.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index cf77866f2..1168cfb99 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -689,4 +689,6 @@ class MainWindow(QWidget): sessions.session_manager.save_last_window_session() self._save_geometry() + log.destroy.debug("Closing window {}".format(self.win_id)) + self.tabbed_browser.shutdown() diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index d061bfc43..987fad3ac 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -382,11 +382,11 @@ class TabbedBrowser(QWidget): def shutdown(self): """Try to shut down all tabs cleanly.""" self.shutting_down = True - # Reverse tabs so we don't have to recacluate tab titles over and over + # Reverse tabs so we don't have to recalculate tab titles over and over # Removing first causes [2..-1] to be recomputed # Removing the last causes nothing to be recomputed for tab in reversed(self.widgets()): - self._remove_tab(tab) + self._remove_tab(tab, add_undo=False) def tab_close_prompt_if_pinned( self, tab, force, yes_action, |