Move workaround for initial TLW size to wxGTK itself

Add wxWindow::WXSetInitialFittingClientSize() instead of handling wxGTK
TLWs specially in the common wxSizer code and override it in wxGTK to
remember that we need to reset the client size once the window is shown.

This commit shouldn't result in any changes in the observed behaviour.
This commit is contained in:
Vadim Zeitlin
2021-04-12 17:52:23 +02:00
parent 329f60d7f3
commit fd7386ed83
5 changed files with 88 additions and 48 deletions

View File

@@ -138,6 +138,16 @@ public:
void GTKDoAfterShow();
#ifdef __WXGTK3__
void GTKUpdateClientSizeIfNecessary();
virtual void WXSetInitialFittingClientSize(int flags) wxOVERRIDE;
private:
// Flags to call WXSetInitialFittingClientSize() with if != 0.
int m_pendingFittingClientSizeFlags;
#endif // __WXGTK3__
protected:
// give hints to the Window Manager for how the size
// of the TLW can be changed by dragging