Fix for WinCE - no delayed sizing for now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-02-03 16:30:14 +00:00
parent 7e02be855d
commit f219764488

View File

@@ -120,7 +120,11 @@
// resizing complicated window hierarchies, but this can in theory result in // resizing complicated window hierarchies, but this can in theory result in
// different behaviour than the old code so we keep the possibility to use it // different behaviour than the old code so we keep the possibility to use it
// by setting this to 0 (in the future this should be removed completely) // by setting this to 0 (in the future this should be removed completely)
#ifdef __WXWINCE__
#define USE_DEFERRED_SIZING 0
#else
#define USE_DEFERRED_SIZING 1 #define USE_DEFERRED_SIZING 1
#endif
// set this to 1 to filter out duplicate mouse events, e.g. mouse move events // set this to 1 to filter out duplicate mouse events, e.g. mouse move events
// when mouse position didnd't change // when mouse position didnd't change
@@ -1500,9 +1504,10 @@ void wxWindowMSW::DoGetSize(int *x, int *y) const
// Get size *available for subwindows* i.e. excluding menu bar etc. // Get size *available for subwindows* i.e. excluding menu bar etc.
void wxWindowMSW::DoGetClientSize(int *x, int *y) const void wxWindowMSW::DoGetClientSize(int *x, int *y) const
{ {
#if USE_DEFERRED_SIZING
if ( IsTopLevel() || m_pendingSize == wxDefaultSize ) if ( IsTopLevel() || m_pendingSize == wxDefaultSize )
{ #endif
// top level windows resizing is never deferred, so we can safely use { // top level windows resizing is never deferred, so we can safely use
// the current size here // the current size here
RECT rect = wxGetClientRect(GetHwnd()); RECT rect = wxGetClientRect(GetHwnd());
@@ -1511,6 +1516,7 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const
if ( y ) if ( y )
*y = rect.bottom; *y = rect.bottom;
} }
#if USE_DEFERRED_SIZING
else // non top level and using deferred sizing else // non top level and using deferred sizing
{ {
// we need to calculate the *pending* client size here // we need to calculate the *pending* client size here
@@ -1527,6 +1533,7 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const
if ( y ) if ( y )
*y = rect.bottom - rect.top; *y = rect.bottom - rect.top;
} }
#endif
} }
void wxWindowMSW::DoGetPosition(int *x, int *y) const void wxWindowMSW::DoGetPosition(int *x, int *y) const