Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix input focus issues #633

Merged
merged 2 commits into from Jul 16, 2014
Merged

Conversation

magcius
Copy link
Member

@magcius magcius commented Jul 16, 2014

This simply fixes the Render to Main Window / Background Input issue. I haven't looked at TAS input, the input OSD, nor radius=100 bugs yet.

This reverts commit ff918df.

This changed it from "RendererHasFocus" to "UIHasFocus", which is
wrong. Specifically, it broke for non-Render to Main Window cases where
the renderer window isn't managed by wx. It also broke the pending
exclusive fullscreen support, which checks this function to determine if
the renderer is on top so it can full-screen it.

We'll add a new hook, "UIHasFocus", in the next commit.
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.
@@ -84,7 +84,7 @@ bool Device::Control::InputGateOn()
{
if (SConfig::GetInstance().m_BackgroundInput)
return true;
else if (Host_RendererHasFocus())
else if (Host_RendererHasFocus() || Host_UIHasFocus())

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@CrossVR
Copy link
Contributor

CrossVR commented Jul 16, 2014

Thanks for restoring the old RendererHasFocus() behaviour, PR #506 depends on it.

wxWindow *window = wxWindow::FindFocus();
if (window == nullptr)
return false;
// Why these different cases?

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

delroth added a commit that referenced this pull request Jul 16, 2014
@delroth delroth merged commit 8cf21cd into dolphin-emu:master Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants