From 19a6943a679c21efb7c18981817cdae03e869273 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 29 Jan 2005 01:24:40 +0000 Subject: [PATCH] Don't use the parent's defered sizing handle if the window in question is a top-level window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0597f96da2..f7b7c2f982 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1499,9 +1499,10 @@ void wxWindowMSW::DoMoveWindow(int x, int y, int width, int height) if (height < 0) height = 0; - // if our parent had prepared a defer window handle for us, use it + // if our parent had prepared a defer window handle for us, use it (unless + // we are a top level window) wxWindowMSW *parent = GetParent(); - HDWP hdwp = parent ? (HDWP)parent->m_hDWP : NULL; + HDWP hdwp = (parent && !IsTopLevel()) ? (HDWP)parent->m_hDWP : NULL; if ( hdwp ) { hdwp = ::DeferWindowPos(hdwp, GetHwnd(), NULL, -- 2.45.2