summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-08-04 13:02:19 +0200
committerJules Blok <jules.blok@gmail.com>2014-08-04 13:22:41 +0200
commit9818bd3edfb9399e956b949245c756724be8c2da (patch)
tree97bb67f4aa06f230532c2873c34d8d332c2d5951 /Source/Core/DolphinWX/FrameTools.cpp
parent99dc069b9a19661cf529028f3d6d1aa5ee69cf29 (diff)
CFrame: Render to a child on Linux and Mac OS X.
This is needed to fix the hotkeys on those platforms.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index 3310623c2c..e1beb095d2 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -973,7 +973,14 @@ void CFrame::StartGame(const std::string& filename)
m_RenderFrame->Bind(wxEVT_CLOSE_WINDOW, &CFrame::OnRenderParentClose, this);
m_RenderFrame->Bind(wxEVT_ACTIVATE, &CFrame::OnActive, this);
m_RenderFrame->Bind(wxEVT_MOVE, &CFrame::OnRenderParentMove, this);
+#ifdef _WIN32
+ // The renderer should use a top-level window for exclusive fullscreen support.
m_RenderParent = m_RenderFrame;
+#else
+ // To capture key events on Linux and Mac OS X the frame needs at least one child.
+ m_RenderParent = new wxPanel(m_RenderFrame, IDM_MPANEL, wxDefaultPosition, wxDefaultSize, 0);
+#endif
+
m_RenderFrame->Show();
}