]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/toplevel_osx.cpp
Applied #10639 (Not all previewed fonts are displayed with the correct nameface)
[wxWidgets.git] / src / osx / toplevel_osx.cpp
index 738b5d607d38f899c0fe7b3a7f2889393379748d..91ac80da69e8b3df0adbe7d08cfcc168211a9c68 100644 (file)
@@ -73,7 +73,10 @@ bool wxTopLevelWindowMac::Create(wxWindow *parent,
                                  long style,
                                  const wxString& name)
 {
-    if ( !wxNonOwnedWindow::Create(parent, id, pos, size, style, name) )
+    int w = WidthDefault(size.x);
+    int h = HeightDefault(size.y);
+
+    if ( !wxNonOwnedWindow::Create(parent, id, pos, wxSize(w,h), style, name) )
         return false;
 
     wxWindow::SetLabel( title ) ;
@@ -145,7 +148,8 @@ wxPoint wxTopLevelWindowMac::GetClientAreaOrigin() const
 void wxTopLevelWindowMac::SetTitle(const wxString& title)
 {
     wxWindow::SetLabel( title ) ;
-    m_nowpeer->SetTitle(title, GetFont().GetEncoding() );
+    if ( m_nowpeer )
+        m_nowpeer->SetTitle(title, GetFont().GetEncoding() );
 }
 
 wxString wxTopLevelWindowMac::GetTitle() const