diff options
| author | Anthony <Helios747@users.noreply.github.com> | 2016-10-29 00:35:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-29 00:35:18 -0500 |
| commit | 41563c55cd56cbdaf245cf4ee26ca49a27861395 (patch) | |
| tree | 1f786af4aac6fb453ec53491af17e10e0896df65 /Source/Core/DolphinWX/Main.cpp | |
| parent | 26902d89e89de46d43adf11a194ea1ef84b9f4da (diff) | |
| parent | ee201455a8810803a9966b951815143786a0767d (diff) | |
Merge pull request #4394 from aldelaro5/fix-focus-detection-linux
Fix window focus detection on Linux (rebase from #3843)
Diffstat (limited to 'Source/Core/DolphinWX/Main.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index bdf6ada482..6620275cfa 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -84,6 +84,7 @@ bool DolphinApp::OnInit() Bind(wxEVT_QUERY_END_SESSION, &DolphinApp::OnEndSession, this); Bind(wxEVT_END_SESSION, &DolphinApp::OnEndSession, this); Bind(wxEVT_IDLE, &DolphinApp::OnIdle, this); + Bind(wxEVT_ACTIVATE_APP, &DolphinApp::OnActivate, this); // Register message box and translation handlers RegisterMsgAlertHandler(&wxMsgAlert); @@ -256,6 +257,11 @@ void DolphinApp::AfterInit() } } +void DolphinApp::OnActivate(wxActivateEvent& ev) +{ + m_is_active = ev.GetActive(); +} + void DolphinApp::InitLanguageSupport() { std::string language_code; @@ -500,7 +506,7 @@ void Host_SetWiiMoteConnectionState(int _State) bool Host_UIHasFocus() { - return main_frame->UIHasFocus(); + return wxGetApp().IsActiveThreadsafe(); } bool Host_RendererHasFocus() |
