From 5192feb38ee32e5d53e4e2fb0c5ec891f1fe59f9 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 18 Aug 2020 08:46:19 -0700 Subject: [PATCH] Fix restoring TLW size when using wxPersistenceManager on GTK The decoration size must be restored before restoring the window size See #18863 --- include/wx/gtk/private/tlwgeom.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/wx/gtk/private/tlwgeom.h b/include/wx/gtk/private/tlwgeom.h index 31cc355997..448cc4ac71 100644 --- a/include/wx/gtk/private/tlwgeom.h +++ b/include/wx/gtk/private/tlwgeom.h @@ -12,6 +12,7 @@ class wxTLWGeometry : public wxTLWGeometryGeneric { + typedef wxTLWGeometryGeneric BaseType; public: virtual bool Save(const Serializer& ser) const wxOVERRIDE { @@ -57,9 +58,6 @@ public: virtual bool ApplyTo(wxTopLevelWindow* tlw) wxOVERRIDE { - if ( !wxTLWGeometryGeneric::ApplyTo(tlw) ) - return false; - // Don't overwrite the current decoration size if we already have it. if ( !tlw->m_decorSize.left && !tlw->m_decorSize.right && !tlw->m_decorSize.top && !tlw->m_decorSize.bottom ) @@ -67,7 +65,7 @@ public: tlw->m_decorSize = m_decorSize; } - return true; + return BaseType::ApplyTo(tlw); } private: