fix: only restore the size if the windows was in the tray

fixes: #9237
This commit is contained in:
sithlord48 2025-11-30 11:42:08 -05:00 committed by Chris Rizzitello
parent 0446db93e6
commit 13219ca49c

View file

@ -1107,6 +1107,7 @@ void MainWindow::updateScreenName()
void MainWindow::showAndActivate() void MainWindow::showAndActivate()
{ {
const auto wasVisible = isVisible();
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS
forceAppActive(); forceAppActive();
#endif #endif
@ -1115,7 +1116,8 @@ void MainWindow::showAndActivate()
activateWindow(); activateWindow();
m_actionRestore->setVisible(false); m_actionRestore->setVisible(false);
m_actionMinimize->setVisible(true); m_actionMinimize->setVisible(true);
restoreWindow(); if (!wasVisible)
restoreWindow();
} }
void MainWindow::showHostNameEditor() void MainWindow::showHostNameEditor()