Repainting fixes/improvements. Use SWP_NOCOPYBITS for statusbars, don't activate when using DeferWindowPos and remove WM_WINDOWPOSCHANGED code (no longer necessary).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -307,8 +307,11 @@ void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height)
|
||||
{
|
||||
// parent pos/size isn't deferred so do it now but don't send
|
||||
// WM_WINDOWPOSCHANGING since we don't want to change pos/size later
|
||||
// we must use SWP_NOCOPYBITS here otherwise it paints incorrectly
|
||||
// if other windows are size deferred
|
||||
::SetWindowPos(GetHwnd(), NULL, x, y, width, height,
|
||||
SWP_NOZORDER | SWP_NOSENDCHANGING);
|
||||
SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE |
|
||||
SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
|
||||
}
|
||||
|
||||
// adjust fields widths to the new size
|
||||
|
@@ -1613,7 +1613,7 @@ wxWindowMSW::DoMoveSibling(WXHWND hwnd, int x, int y, int width, int height)
|
||||
if ( hdwp )
|
||||
{
|
||||
hdwp = ::DeferWindowPos(hdwp, (HWND)hwnd, NULL, x, y, width, height,
|
||||
SWP_NOZORDER);
|
||||
SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE);
|
||||
if ( !hdwp )
|
||||
{
|
||||
wxLogLastError(_T("DeferWindowPos"));
|
||||
@@ -2394,28 +2394,6 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
||||
break;
|
||||
#endif // !__WXWINCE__
|
||||
|
||||
#if !(defined(_WIN32_WCE) && _WIN32_WCE < 400)
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
{
|
||||
WINDOWPOS *lpPos = (WINDOWPOS *)lParam;
|
||||
|
||||
if ( !(lpPos->flags & SWP_NOSIZE) )
|
||||
{
|
||||
RECT rc;
|
||||
::GetClientRect(GetHwnd(), &rc);
|
||||
|
||||
AutoHRGN hrgnClient(::CreateRectRgnIndirect(&rc));
|
||||
AutoHRGN hrgnNew(::CreateRectRgn(lpPos->x, lpPos->y,
|
||||
lpPos->cx, lpPos->cy));
|
||||
|
||||
// we need to invalidate any new exposed areas here
|
||||
// to force them to repaint
|
||||
if ( ::CombineRgn(hrgnNew, hrgnNew, hrgnClient, RGN_DIFF) != NULLREGION )
|
||||
::InvalidateRgn(GetHwnd(), hrgnNew, TRUE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||
case WM_ACTIVATEAPP:
|
||||
// This implicitly sends a wxEVT_ACTIVATE_APP event
|
||||
|
Reference in New Issue
Block a user