#endif
if (x)
- *x = ww;
+ {
+ // we shouldn't return invalid width
+ if ( ww < 0 )
+ ww = 0;
+
+ *x = ww;
+ }
+
if (y)
- *y = hh;
-}
-
-double wxWindowMac::GetMagnificationFactor() const
-{
- wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ;
- wxCHECK_MSG( tlw , 1.0, wxT("TopLevel Window missing") ) ;
- return tlw->GetMagnificationFactor();
+ {
+ // we shouldn't return invalid height
+ if ( hh < 0 )
+ hh = 0;
+
+ *y = hh;
+ }
}
bool wxWindowMac::SetCursor(const wxCursor& cursor)
}
}
-float wxWindowMac::GetContentScaleFactor() const
+double wxWindowMac::GetContentScaleFactor() const
{
return GetPeer()->GetContentScaleFactor();
}