From 299c66b82cd0bd237961bfd38c7f2a35b0e39be5 Mon Sep 17 00:00:00 2001 From: Noah Huesser Date: Mon, 23 May 2016 11:32:27 +0200 Subject: [PATCH] Possibly fixed issue: #1484 --- qutebrowser/app.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 459c2f76b..96fed4b5b 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -343,18 +343,14 @@ def _save_version(): @pyqtSlot('QWidget*', 'QWidget*') def on_focus_changed(_old, new): """Register currently focused main window in the object registry.""" - if new is None: - window = None - else: - window = new.window() - if window is None or not isinstance(window, mainwindow.MainWindow): + if new is None or not isinstance(new, mainwindow.MainWindow): try: objreg.delete('last-focused-main-window') except KeyError: pass qApp.restoreOverrideCursor() else: - objreg.register('last-focused-main-window', window, update=True) + objreg.register('last-focused-main-window', new.window(), update=True) _maybe_hide_mouse_cursor()