From e62ba57291abd66b65a22e6037f14b6aa1d92928 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 12 May 2015 21:04:18 +0200 Subject: [PATCH] Always save last window session. len(objreg.window_registry) can actually lag behind because single-shot QTimers are used to remove the windows from the registry - but actually it doesn't even matter if this is the last window or not. We just always save to SessionManager._last_window_session, and it gets used in SessionManager.save. Fixes #650. --- qutebrowser/mainwindow/mainwindow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 6bfae1589..846020b86 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -416,8 +416,7 @@ class MainWindow(QWidget): e.ignore() return e.accept() - if len(objreg.window_registry) == 1: - objreg.get('session-manager').save_last_window_session() + objreg.get('session-manager').save_last_window_session() self._save_geometry() log.destroy.debug("Closing window {}".format(self.win_id)) self._tabbed_browser.shutdown()