diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 78fd8c93cb..4153c61a48 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/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 = WidthDefault(size.y); wxTopLevelWindows.Append( this ); diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 78fd8c93cb..4153c61a48 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 = WidthDefault(size.y); wxTopLevelWindows.Append( this );