never return negative client sizes, fixes #15338
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -872,9 +872,22 @@ void wxWindowMac::DoGetClientSize( int *x, int *y ) const
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
if (x)
|
if (x)
|
||||||
*x = ww;
|
{
|
||||||
|
// we shouldn't return invalid width
|
||||||
|
if ( ww < 0 )
|
||||||
|
ww = 0;
|
||||||
|
|
||||||
|
*x = ww;
|
||||||
|
}
|
||||||
|
|
||||||
if (y)
|
if (y)
|
||||||
*y = hh;
|
{
|
||||||
|
// we shouldn't return invalid height
|
||||||
|
if ( hh < 0 )
|
||||||
|
hh = 0;
|
||||||
|
|
||||||
|
*y = hh;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindowMac::SetCursor(const wxCursor& cursor)
|
bool wxWindowMac::SetCursor(const wxCursor& cursor)
|
||||||
|
|||||||
Reference in New Issue
Block a user