diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index a6e7eda125..97865070ac 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -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 \ No newline at end of file +#endif