]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix MSW compilation with wxUSE_DEFERRED_SIZING==0.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Jul 2010 23:33:36 +0000 (23:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Jul 2010 23:33:36 +0000 (23:33 +0000)
Add checks for wxUSE_DEFERRED_SIZING around the code using
wxWindow::m_pending{Size,Position}.

Closes #11348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp
src/msw/window.cpp

index ae83dfefb12b1f42c9227f00f5e60a74173e9e1f..dfb7b19ef462f9a12f1edc97b516c295cf9c100c 100644 (file)
@@ -662,6 +662,7 @@ bool wxTopLevelWindowMSW::Show(bool show)
         nShowCmd = SW_HIDE;
     }
 
+#if wxUSE_DEFERRED_SIZING
     // we only set pending size if we're maximized before being shown, now that
     // we're shown we don't need it any more (it is reset in size event handler
     // for child windows but we have to do it ourselves for this parent window)
@@ -671,6 +672,7 @@ bool wxTopLevelWindowMSW::Show(bool show)
     // them, not the size returned by WM_NCCALCSIZE in DoGetClientSize() which
     // turns out to be wrong for maximized windows (see #11762)
     m_pendingSize = wxDefaultSize;
+#endif // wxUSE_DEFERRED_SIZING
 
     DoShowWindow(nShowCmd);
 
@@ -701,6 +703,7 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
         // so just remember that we should do it later in this case
         m_maximizeOnShow = maximize;
 
+#if wxUSE_DEFERRED_SIZING
         // after calling Maximize() the client code expects to get the frame
         // "real" size and doesn't want to know that, because of implementation
         // details, the frame isn't really maximized yet but will be only once
@@ -718,6 +721,7 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
             m_pendingSize = wxGetClientDisplayRect().GetSize();
         }
         //else: can't do anything in this case, we don't have the old size
+#endif // wxUSE_DEFERRED_SIZING
     }
 }
 
index d0cb9beda201c5d099e11d83cbd67235ef820bc6..5dd89b0bc36b53a949f949d27500e731e9244bc8 100644 (file)
@@ -1865,11 +1865,13 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const
     wxWindow * const parent = GetParent();
 
     wxPoint pos;
+#if wxUSE_DEFERRED_SIZING
     if ( m_pendingPosition != wxDefaultPosition )
     {
         pos = m_pendingPosition;
     }
     else // use current position
+#endif // wxUSE_DEFERRED_SIZING
     {
         RECT rect = wxGetWindowRect(GetHwnd());