is a top-level window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31636
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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,