Fix ever shrinking window height for frame windows that are not maximized.

For some reason this does not affect the KiCad frame manager window so it
is an exception to prevent it from becoming an ever growing window height
issue.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8889
This commit is contained in:
Wayne Stambaugh 2021-10-07 16:58:37 -04:00
parent faad5ee1ce
commit 034bc1e815
1 changed files with 10 additions and 5 deletions

View File

@ -1216,14 +1216,19 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
wxSize EDA_BASE_FRAME::GetWindowSize()
{
#ifdef __WXGTK__
wxSize winSize = GetSize();
// GTK includes the window decorations in the normal GetSize call,
// so we have to use a GTK-specific sizing call that returns the
// non-decorated window size.
int width = 0;
int height = 0;
GTKDoGetSize( &width, &height );
if( m_ident == KICAD_MAIN_FRAME_T )
{
int width = 0;
int height = 0;
GTKDoGetSize( &width, &height );
wxSize winSize( width, height );
winSize.Set( width, height );
}
#else
wxSize winSize = GetSize();
#endif
@ -1269,4 +1274,4 @@ WXLRESULT EDA_BASE_FRAME::MSWWindowProc( WXUINT message, WXWPARAM wParam, WXLPAR
return wxFrame::MSWWindowProc( message, wParam, lParam );
}
#endif
#endif