Qt: Fix GBAKeyEditor focus issues
Jeffrey Pfau jeffrey@endrift.com
Sun, 17 Jan 2016 16:29:05 -0800
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
src/platform/qt/GBAKeyEditor.cpp
→
src/platform/qt/GBAKeyEditor.cpp
@@ -171,9 +171,10 @@ m_controller->releaseFocus(this);
} bool GBAKeyEditor::event(QEvent* event) { - if (event->type() == QEvent::WindowActivate) { + QEvent::Type type = event->type(); + if (type == QEvent::WindowActivate || type == QEvent::Show) { m_controller->stealFocus(this); - } else if (event->type() == QEvent::WindowDeactivate) { + } else if (type == QEvent::WindowDeactivate || type == QEvent::Hide) { m_controller->releaseFocus(this); } return QWidget::event(event);