From e8cb4119b861d7d76f051f45bf2ebf5689d1c8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 15 Jul 2016 23:59:05 +0200 Subject: Drop Dolphin-specific patch to wxWindows This removes a Dolphin-specific patch to the wxWidgets3 code for the following reasons: * Calling wxWindowGTK::DoSetSize on a top-level window can end up calling wxTopLevelWindowGTK::DoMoveWindow, which triggers an assert because it is not supposed to be called for a top-level wxWindow. * We should not be patching the wxWidgets code because that means the toolbars will still be broken if someone builds without using the WX that is in our Externals. Instead, we now use a derived class for wxAuiToolBar and override DoSetSize() to remove the problematic behaviour to get the same effect (fixing toolbars) but without changing Externals code and without causing asserts and other issues. --- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp') diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index beda6a442b..8e0b2f80d9 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -8,7 +8,6 @@ // clang-format off #include -#include #include #include #include @@ -19,6 +18,7 @@ #include #include #include +#include #include // clang-format on @@ -45,6 +45,7 @@ #include "DolphinWX/Debugger/JitWindow.h" #include "DolphinWX/Debugger/RegisterWindow.h" #include "DolphinWX/Debugger/WatchWindow.h" +#include "DolphinWX/AuiToolBar.h" #include "DolphinWX/Frame.h" #include "DolphinWX/Globals.h" #include "DolphinWX/WxUtils.h" @@ -74,8 +75,8 @@ CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame* pare callers = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT); callers->Bind(wxEVT_LISTBOX, &CCodeWindow::OnCallersListChange, this); - m_aui_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxAUI_TB_HORIZONTAL | wxAUI_TB_PLAIN_BACKGROUND); + m_aui_toolbar = new DolphinAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxAUI_TB_HORIZONTAL | wxAUI_TB_PLAIN_BACKGROUND); wxSearchCtrl* const address_searchctrl = new wxSearchCtrl(m_aui_toolbar, IDM_ADDRBOX); address_searchctrl->Bind(wxEVT_TEXT, &CCodeWindow::OnAddrBoxChange, this); -- cgit v1.2.3