Load geometry after completion is initialized.

Fixes #766.
This commit is contained in:
Florian Bruhin 2015-06-18 10:32:07 +02:00
parent c64d9520ff
commit 0350d19bd3

View File

@ -120,14 +120,6 @@ class MainWindow(QWidget):
window=self.win_id)
self.setWindowTitle('qutebrowser')
if geometry is not None:
self._load_geometry(geometry)
elif self.win_id == 0:
self._load_state_geometry()
else:
self._set_default_geometry()
log.init.debug("Initial main window geometry: {}".format(
self.geometry()))
self._vbox = QVBoxLayout(self)
self._vbox.setContentsMargins(0, 0, 0, 0)
self._vbox.setSpacing(0)
@ -165,6 +157,15 @@ class MainWindow(QWidget):
log.init.debug("Initializing modes...")
modeman.init(self.win_id, self)
if geometry is not None:
self._load_geometry(geometry)
elif self.win_id == 0:
self._load_state_geometry()
else:
self._set_default_geometry()
log.init.debug("Initial main window geometry: {}".format(
self.geometry()))
self._connect_signals()
# When we're here the statusbar might not even really exist yet, so