mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 13:18:50 +00:00
NetWindow: non-ugly way to check for window focus
This commit is contained in:
parent
2b4a249dea
commit
65adf76698
1 changed files with 1 additions and 4 deletions
|
@ -399,10 +399,7 @@ void NetPlayDialog::OnThread(wxThreadEvent& event)
|
||||||
|
|
||||||
// flash window in taskbar when someone joins if window isn't active
|
// flash window in taskbar when someone joins if window isn't active
|
||||||
static u8 numPlayers = 1;
|
static u8 numPlayers = 1;
|
||||||
bool focus = (wxWindow::FindFocus() == this || (wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() == this) ||
|
if (netplay_server != nullptr && numPlayers < m_playerids.size() && !HasFocus())
|
||||||
(wxWindow::FindFocus() != nullptr && wxWindow::FindFocus()->GetParent() != nullptr
|
|
||||||
&& wxWindow::FindFocus()->GetParent()->GetParent() == this));
|
|
||||||
if (netplay_server != nullptr && numPlayers < m_playerids.size() && !focus)
|
|
||||||
{
|
{
|
||||||
RequestUserAttention();
|
RequestUserAttention();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue