mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-24 16:51:59 +01:00
Merge pull request #5124 from TheUbuntuGuy/mmonfix
Respawn mainwindow on correct monitor
This commit is contained in:
commit
4393f7e53f
@ -903,12 +903,11 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
|
||||
qLog(Debug) << "Loading settings";
|
||||
settings_.beginGroup(kSettingsGroup);
|
||||
|
||||
// Set window Geometry if the window was closed in normal mode
|
||||
// else set it to window maximized
|
||||
// Set last used geometry to position window on the correct monitor
|
||||
// Set window state only if the window was last maximized
|
||||
was_maximized_ = settings_.value("maximized", false).toBool();
|
||||
if (!was_maximized_) {
|
||||
restoreGeometry(settings_.value("geometry").toByteArray());
|
||||
} else {
|
||||
restoreGeometry(settings_.value("geometry").toByteArray());
|
||||
if (was_maximized_) {
|
||||
setWindowState(windowState() | Qt::WindowMaximized);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user