Qt: Only send button events if there is a widget in focus
Jeffrey Pfau jeffrey@endrift.com
Sun, 04 Jan 2015 22:42:42 -0800
1 files changed,
3 insertions(+),
0 deletions(-)
M
src/platform/qt/InputController.cpp
→
src/platform/qt/InputController.cpp
@@ -194,6 +194,9 @@
auto activeButtons = activeGamepadButtons(); auto oldButtons = m_activeButtons; m_activeButtons = activeButtons; + if (!QApplication::focusWidget()) { + return; + } activeButtons.subtract(oldButtons); oldButtons.subtract(m_activeButtons); for (int button : activeButtons) {