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.
This commit is contained in:
Léo Lam committed 2016-09-07 15:15:09 +02:00
1 parent b2dcbbf884
commit e8cb4119b8
9 files changed
+42 -22

No files matched your search

+1 -3
View File
@@ -3072,9 +3072,7 @@ void wxWindowGTK::DoSetClientSize( int width, int height )
const wxSize size = GetSize();
const wxSize clientSize = GetClientSize();
// XXX: Dolphin: This is an internal call, it should never trigger the SetSize path in derived classes.
// This fixes wxAuiToolbar setting itself to 21 pixels wide regardless of content.
wxWindowGTK::DoSetSize(wxDefaultCoord, wxDefaultCoord, width + (size.x - clientSize.x), height + (size.y - clientSize.y), wxSIZE_USE_EXISTING);
SetSize(width + (size.x - clientSize.x), height + (size.y - clientSize.y));
}
void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
+1 -2
View File
@@ -1212,8 +1212,7 @@ void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight)
GetClientSize( &currentclientwidth , &currentclientheight ) ;
GetSize( &currentwidth , &currentheight ) ;
// XXX: Dolphin. Do not allow internal semantic call to become visible to derived classes.
wxWindowMac::DoSetSize( wxDefaultCoord , wxDefaultCoord , currentwidth + clientwidth - currentclientwidth ,
DoSetSize( wxDefaultCoord , wxDefaultCoord , currentwidth + clientwidth - currentclientwidth ,
currentheight + clientheight - currentclientheight , wxSIZE_USE_EXISTING ) ;
}
}