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,6 +1116,7 @@ void MainWindow::showAndActivate()
activateWindow(); activateWindow();
m_actionRestore->setVisible(false); m_actionRestore->setVisible(false);
m_actionMinimize->setVisible(true); m_actionMinimize->setVisible(true);
if (!wasVisible)
restoreWindow(); restoreWindow();
} }