X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca06ee0df7598b07b9150a8d478a235b6fff4755..f925e7b4f3d017b33749bd23a64592c1985e8f98:/src/gtk1/toplevel.cpp diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index f5f5b12e73..b4a0ed8489 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -327,14 +327,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, // always create a frame of some reasonable, even if arbitrary, size (at // least for MSW compatibility) wxSize size = sizeOrig; - if ( size.x == -1 || size.y == -1 ) - { - wxSize sizeDpy = wxGetDisplaySize(); - if ( size.x == -1 ) - size.x = sizeDpy.x / 3; - if ( size.y == -1 ) - size.y = sizeDpy.y / 5; - } + size.x = WidthDefault(size.x); + size.y = HeightDefault(size.y); wxTopLevelWindows.Append( this ); @@ -653,16 +647,15 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; @@ -745,16 +738,15 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;