Skip to content

Commit

Permalink
Merge pull request #1947 from theMackabu/patch-minimized
Browse files Browse the repository at this point in the history
  • Loading branch information
timoreo22 committed Dec 13, 2023
2 parents 4612607 + 2391ad2 commit a382754
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,13 +1513,25 @@ InstanceWindow* Application::showInstanceWindow(InstancePtr instance, QString pa
auto& window = extras.window;

if (window) {
// If the window is minimized on macOS or Windows, activate and bring it up
#ifdef Q_OS_MACOS
if (window->isMinimized()) {
window->setWindowState(window->windowState() & ~Qt::WindowMinimized);
}
#elif defined(Q_OS_WIN)
if (window->isMinimized()) {
window->showNormal();
}
#endif

window->raise();
window->activateWindow();
} else {
window = new InstanceWindow(instance);
m_openWindows++;
connect(window, &InstanceWindow::isClosing, this, &Application::on_windowClose);
}

if (!page.isEmpty()) {
window->selectPage(page);
}
Expand Down

0 comments on commit a382754

Please sign in to comment.