From 6ab6d07948bbad70b9d13d13634f510695fb45b4 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sat, 2 Aug 2014 13:55:23 +0200 Subject: [PATCH] FrameTools: Add a wxPanel as the child of the RenderFrame. Needed for hotkeys to be captured on Linux. --- Source/Core/DolphinWX/FrameTools.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); }