mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-08 09:18:43 +00:00
Clear the minimized state on the Qt window if the SDL window is not minimized
This commit is contained in:
parent
c6710f93dc
commit
6a85996b4a
1 changed files with 12 additions and 0 deletions
|
@ -2190,9 +2190,21 @@ DispatchDeferredCleanup:
|
|||
// in a larger window, but they don't necessarily want the UI in such
|
||||
// a large window.
|
||||
if (!m_IsFullScreen && m_QtWindow != nullptr && m_Window != nullptr) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (SDL_GetWindowFlags(m_Window) & SDL_WINDOW_MINIMIZED) {
|
||||
m_QtWindow->setWindowStates(m_QtWindow->windowStates() | Qt::WindowMinimized);
|
||||
}
|
||||
else if (m_QtWindow->windowStates() & Qt::WindowMinimized) {
|
||||
m_QtWindow->setWindowStates(m_QtWindow->windowStates() & ~Qt::WindowMinimized);
|
||||
}
|
||||
#else
|
||||
if (SDL_GetWindowFlags(m_Window) & SDL_WINDOW_MINIMIZED) {
|
||||
m_QtWindow->setWindowState(Qt::WindowMinimized);
|
||||
}
|
||||
else if (m_QtWindow->windowState() & Qt::WindowMinimized) {
|
||||
m_QtWindow->setWindowState(Qt::WindowNoState);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// This must be called after the decoder is deleted, because
|
||||
|
|
Loading…
Reference in a new issue