summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-08-02 13:55:23 +0200
committerJules Blok <jules.blok@gmail.com>2014-08-02 13:55:23 +0200
commit6ab6d07948bbad70b9d13d13634f510695fb45b4 (patch)
treed2bf49f65d3678785c3d8a4c44baae471bbe22f7 /Source/Core/DolphinWX/FrameTools.cpp
parent7e83a0ea9be49abee3a4c8a2e953ca0905271434 (diff)
FrameTools: Add a wxPanel as the child of the RenderFrame.
Needed for hotkeys to be captured on Linux.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index 8ef5fd19f4..2b3cbff4fd 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -970,12 +970,16 @@ void CFrame::StartGame(const std::string& filename)
else
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
- m_RenderFrame->SetBackgroundColour(*wxBLACK);
m_RenderFrame->SetClientSize(size.GetWidth(), size.GetHeight());
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);
m_RenderParent = m_RenderFrame;
+
+ // To capture key events the frame needs at least one child.
+ wxPanel* panel = new wxPanel(m_RenderFrame, IDM_MPANEL, wxDefaultPosition, wxDefaultSize, 0);
+ panel->SetBackgroundColour(*wxBLACK);
+
m_RenderFrame->Show();
}