mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Host: Add a new "UIHasFocus" hook to determine if the UI has focus
We can't use RendererHasFocus for this purpose because of some issues with exclusive fullscreen, and the new RendererHasFocus implementation didn't work for non-Render to Main Window cases, since the renderer window wasn't managed by wx.
This commit is contained in:
@ -773,6 +773,19 @@ bool CFrame::RendererHasFocus()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CFrame::UIHasFocus()
|
||||
{
|
||||
// UIHasFocus should return true any time any one of our UI
|
||||
// windows has the focus, including any dialogs or other windows.
|
||||
//
|
||||
// wxGetActiveWindow() returns the current wxWindow which has
|
||||
// focus. If it's not one of our windows, then it will return
|
||||
// null.
|
||||
|
||||
wxWindow *focusWindow = wxGetActiveWindow();
|
||||
return (focusWindow != nullptr);
|
||||
}
|
||||
|
||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||
{
|
||||
// Show all platforms and regions if...
|
||||
|
Reference in New Issue
Block a user