mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-28 12:50:20 +02:00
Merge pull request #1947 from theMackabu/patch-minimized
This commit is contained in:
commit
a382754b1e
@ -1513,6 +1513,17 @@ 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 {
|
||||
@ -1520,6 +1531,7 @@ InstanceWindow* Application::showInstanceWindow(InstancePtr instance, QString pa
|
||||
m_openWindows++;
|
||||
connect(window, &InstanceWindow::isClosing, this, &Application::on_windowClose);
|
||||
}
|
||||
|
||||
if (!page.isEmpty()) {
|
||||
window->selectPage(page);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user