#endif
if (x)
- *x = ww;
+ {
+ // we shouldn't return invalid width
+ if ( ww < 0 )
+ ww = 0;
+
+ *x = ww;
+ }
+
if (y)
- *y = hh;
+ {
+ // 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();
}
// wxWidgetImpl
//
+// we are maintaining a n:1 map from native controls (ControlRef / NSView*) to their wxWidgetImpl
+// n:1 because we might have an embedded view eg within a scrollview, both being part of the same impl
+// the impl is calling Associate with its newly created native control(s), e.g. in InstallHandler
+
WX_DECLARE_HASH_MAP(WXWidget, wxWidgetImpl*, wxPointerHash, wxPointerEqual, MacControlMap);
static MacControlMap wxWinMacControlList;