From: Vadim Zeitlin Date: Tue, 29 Jul 2008 12:35:15 +0000 (+0000) Subject: generate a size event from ShowWithEffect() for consistency with Show() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7157abfba1c0db6fba7e938dd7ada17225b29a10 generate a size event from ShowWithEffect() for consistency with Show() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 7dfd87df99..b5cd8d1f6f 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -755,6 +755,11 @@ wxWindowMSW::MSWShowWithEffect(bool show, if ( !s_pfnAnimateWindow ) return Show(show); + // Show() has a side effect of sending a WM_SIZE to the window, which helps + // ensuring that it's laid out correctly, but AnimateWindow() doesn't do + // this so send the event ourselves + SendSizeEvent(); + // prepare to use AnimateWindow() if ( !timeout )