From 65adf7669845b624c6a8e34da7cce444a81040e8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 Aug 2015 01:13:48 -0400 Subject: [PATCH] NetWindow: non-ugly way to check for window focus --- Source/Core/DolphinWX/NetPlay/NetWindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp index e39a06698b..c82f3003b0 100644 --- a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp +++ b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp @@ -399,10 +399,7 @@ void NetPlayDialog::OnThread(wxThreadEvent& event) // flash window in taskbar when someone joins if window isn't active static u8 numPlayers = 1; - bool focus = (wxWindow::FindFocus() == this || (wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() == this) || - (wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() != nullptr - && wxWindow::FindFocus()->GetParent()->GetParent() == this)); - if (netplay_server != nullptr && numPlayers < m_playerids.size() && !focus) + if (netplay_server != nullptr && numPlayers < m_playerids.size() && !HasFocus()) { RequestUserAttention(); }