//RN: If we are using wxDisplay we get
//the dimensions of the monitor the window is on,
//otherwise we get the dimensions of the primary monitor
-#if wxUSE_DISPLAY
+ //FIXME: wxDisplay::GetFromWindow only implemented on MSW
+#if wxUSE_DISPLAY && defined(__WXMSW__)
int nDisplay = wxDisplay::GetFromWindow((wxWindow*)this);
if(nDisplay != wxNOT_FOUND)
{
wxSize wxWindowBase::DoGetVirtualSize() const
{
- if (m_virtualSize == wxDefaultSize)
- return GetClientSize();
+ if ( m_virtualSize.IsFullySpecified() )
+ return m_virtualSize;
+
+ wxSize size = GetClientSize();
+ if ( m_virtualSize.x != wxDefaultCoord )
+ size.x = m_virtualSize.x;
+
+ if ( m_virtualSize.y != wxDefaultCoord )
+ size.y = m_virtualSize.y;
- return m_virtualSize;
+ return size;
}
// ----------------------------------------------------------------------------