From ae44aa01a6d7d6f2e2b2e97a48f49a579f342c9f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 6 Oct 2014 22:29:18 +0200 Subject: [PATCH] Set initial focused window correctly. --- qutebrowser/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 94d2a31c8..d1c35208d 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -153,7 +153,10 @@ class Application(QApplication): download_manager = downloads.DownloadManager(self) objreg.register('download-manager', download_manager) log.init.debug("Initializing main window...") - mainwindow.MainWindow.spawn(False if self._args.nowindow else True) + win_id = mainwindow.MainWindow.spawn( + False if self._args.nowindow else True) + main_window = objreg.get('main-window', scope='window', window=win_id) + self.setActiveWindow(main_window) log.init.debug("Initializing debug console...") debug_console = console.ConsoleWidget() objreg.register('debug-console', debug_console)