return correct client area for at least the primary display, fixes the problems with incorrect positioning of the Center()d windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,6 +66,7 @@ wxMSW
|
|||||||
|
|
||||||
wxMac
|
wxMac
|
||||||
|
|
||||||
|
- Fix position of the centered windows (didn't take menu bar size into account)
|
||||||
- Added support for the wxFRAME_FLOAT_ON_PARENT style.
|
- Added support for the wxFRAME_FLOAT_ON_PARENT style.
|
||||||
|
|
||||||
wxX11:
|
wxX11:
|
||||||
|
@@ -63,6 +63,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual wxRect GetGeometry() const;
|
virtual wxRect GetGeometry() const;
|
||||||
|
virtual wxRect GetClientArea() const;
|
||||||
virtual wxString GetName() const { return wxString(); }
|
virtual wxString GetName() const { return wxString(); }
|
||||||
|
|
||||||
virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const;
|
virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const;
|
||||||
@@ -173,6 +174,17 @@ wxRect wxDisplayImplMacOSX::GetGeometry() const
|
|||||||
(int)theRect.size.height ); //floats
|
(int)theRect.size.height ); //floats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxRect wxDisplayImplMacOSX::GetClientArea() const
|
||||||
|
{
|
||||||
|
// VZ: I don't know how to get client area for arbitrary display but
|
||||||
|
// wxGetClientDisplayRect() does work correctly for at least the main
|
||||||
|
// one (TODO: do it correctly for the other displays too)
|
||||||
|
if ( IsPrimary() )
|
||||||
|
return wxGetClientDisplayRect();
|
||||||
|
|
||||||
|
return wxDisplayImpl::GetClientArea();
|
||||||
|
}
|
||||||
|
|
||||||
static int wxCFDictKeyToInt( CFDictionaryRef desc, CFStringRef key )
|
static int wxCFDictKeyToInt( CFDictionaryRef desc, CFStringRef key )
|
||||||
{
|
{
|
||||||
CFNumberRef value = (CFNumberRef) CFDictionaryGetValue( desc, key );
|
CFNumberRef value = (CFNumberRef) CFDictionaryGetValue( desc, key );
|
||||||
|
Reference in New Issue
Block a user