Fix window size reset on every launch.

Regression was introduced in b08732cf28.

In MediaView constructor a call to setWindowState(WindowFullScreen)
invokes QWindowSystemInterface::flushWindowSystemEvents() which then
delivers some delayed system window resize event for the main window,
resetting its size to something default.
This commit is contained in:
John Preston 2017-09-03 22:10:50 +03:00
parent 2e374e68c5
commit ad41a81b66
1 changed files with 2 additions and 0 deletions

View File

@ -130,7 +130,9 @@ Messenger::Messenger() : QObject()
_window->createWinId();
_window->init();
auto currentGeometry = _window->geometry();
_mediaView = std::make_unique<MediaView>();
_window->setGeometry(currentGeometry);
QCoreApplication::instance()->installEventFilter(this);
Sandbox::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState)));