From 3449c5cb3b084493732d545c9407848bb4dff2ea Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 6 Apr 2015 22:02:06 -0700 Subject: [PATCH] Qt: Fix window not regaining focus after exiting savestate window --- CHANGES | 1 + src/platform/qt/Window.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 4d84885ca..d899fb096 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Bugfixes: - ARM7: Fix SWI and IRQ timings - GBA Audio: Force audio FIFOs to 32-bit - GBA Memory: Ensure changing the timing of a DMA reschedules it + - Qt: Fix window not regaining focus after exiting savestate window 0.2.0: (2015-04-03) Features: diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 84c52ae6d..3076593fb 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -542,7 +542,7 @@ void Window::openStateWindow(LoadSave ls) { connect(m_stateWindow, &LoadSaveState::closed, [this]() { m_screenWidget->layout()->removeWidget(m_stateWindow); m_stateWindow = nullptr; - setFocus(); + QMetaObject::invokeMethod(this, "setFocus", Qt::QueuedConnection); }); if (!wasPaused) { m_controller->setPaused(true);