Qt: Fix screen freezing on macOS after closing save state window (fixes #2885)

This commit is contained in:
Vicki Pfau 2024-01-07 16:57:15 -08:00
parent feb7b5a116
commit 16c777cdd9
2 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Other fixes:
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
- Qt: Re-enable sync for multiplayer windows that aren't connected (fixes mgba.io/i/2974)
- Qt: Fix mute settings not being loaded on setting screen (fixes mgba.io/i/2990)
- Qt: Fix screen freezing on macOS after closing save state window (fixes mgba.io/i/2885)
- Vita: Fix camera setting not appearing (fixes mgba.io/i/3012)
Misc:
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)

View File

@ -1931,8 +1931,15 @@ void Window::setupOptions() {
}
void Window::attachWidget(QWidget* widget) {
// Fix https://mgba.io/i/2885 -- seems like a Qt bug
if (m_display && widget != m_display.get()) {
m_display->hide();
}
takeCentralWidget();
setCentralWidget(widget);
if (m_display && widget == m_display.get()) {
m_display->show();
}
}
void Window::detachWidget() {