mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Fix focus detection on OS X by replacing wxGetActiveWindow with wxWindow::FindFocus.
wxGetActiveWindow is implemented as "return NULL" on OS X, while wxWindow::FindFocus works. On Windows, the difference is in the use of GetActiveWindow() vs. GetForegroundWindow(). A MSDN comment says: > A system has only one active window, which GetForegroundWindow() > returns. GetActiveWindow() seems to return the same window as > GetForegroundWindow() if the foreground window belongs to the current > thread. Otherwise, it always returns null, rather than the topmost > window of the calling thread. Since we are on the GUI thread, it shouldn't make any difference.
This commit is contained in:
parent
b5ebace92e
commit
8fed5aa492
3 changed files with 5 additions and 5 deletions
|
@ -484,7 +484,7 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
|||
if (wxIsMainThread())
|
||||
#endif
|
||||
return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption),
|
||||
(yes_no) ? wxYES_NO : wxOK, wxGetActiveWindow());
|
||||
(yes_no) ? wxYES_NO : wxOK, wxWindow::FindFocus());
|
||||
#ifdef __WXGTK__
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue