#endif // wxUSE_PALETTE
m_virtualSize = wxDefaultSize;
- m_minVirtualWidth = -1;
- m_minVirtualHeight = -1;
- m_maxVirtualWidth = -1;
+
+ m_minVirtualWidth =
+ m_minVirtualHeight =
+ m_maxVirtualWidth =
m_maxVirtualHeight = -1;
// Whether we're using the current theme for this window (wxGTK only for now)
}
}
+ // there is no wxTopLevelWindow under wxMotif yet
+#ifndef __WXMOTIF__
+ // we shouldn't center the dialog on the iconized window: under
+ // Windows, for example, this places it completely off the screen
+ if ( parent )
+ {
+ wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
+ if ( winTop && winTop->IsIconized() )
+ {
+ parent = NULL;
+ }
+ }
+#endif // __WXMOTIF__
+
// did we find the parent?
if ( !parent )
{
void wxWindowBase::DoSetVirtualSize( int x, int y )
{
- if( m_minVirtualWidth != -1 && m_minVirtualWidth > x ) x = m_minVirtualWidth;
- if( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x ) x = m_maxVirtualWidth;
- if( m_minVirtualHeight != -1 && m_minVirtualHeight > y ) y = m_minVirtualHeight;
- if( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y ) y = m_maxVirtualHeight;
+ if ( m_minVirtualWidth != -1 && m_minVirtualWidth > x )
+ x = m_minVirtualWidth;
+ if ( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x )
+ x = m_maxVirtualWidth;
+ if ( m_minVirtualHeight != -1 && m_minVirtualHeight > y )
+ y = m_minVirtualHeight;
+ if ( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y )
+ y = m_maxVirtualHeight;
- m_virtualSize.SetWidth( x );
- m_virtualSize.SetHeight( y );
+ m_virtualSize = wxSize(x, y);
}
wxSize wxWindowBase::DoGetVirtualSize() const
void wxWindowBase::CaptureMouse()
{
- wxLogTrace(_T("mousecapture"), _T("CaptureMouse(0x%08x)"), this);
+ wxLogTrace(_T("mousecapture"), _T("CaptureMouse(%p)"), this);
wxWindow *winOld = GetCapture();
if ( winOld )
void wxWindowBase::ReleaseMouse()
{
- wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
+ wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(%p)"), this);
- wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") )
+ wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") );
DoReleaseMouse();
//else: stack is empty, no previous capture
wxLogTrace(_T("mousecapture"),
- _T("After ReleaseMouse() mouse is captured by 0x%08x"),
+ _T("After ReleaseMouse() mouse is captured by %p"),
GetCapture());
}
return win;
}
+// vi:sts=4:sw=4:et