Re: user32: Some changes in minimizing MDI windows (bug #1719)
"Ilya Shpigor" <shpigor(a)etersoft.ru> wrote: These all changes need separate patches with test cases along with explanations why each of them is needed.
--- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -217,6 +217,7 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, case WM_NCHITTEST: return HTCAPTION; case WM_NCMOUSEMOVE: + case WM_NCLBUTTONDOWN: case WM_NCLBUTTONDBLCLK: return SendMessageW( owner, msg, wParam, lParam );
This one looks like an obvious one, but needs an explanation.
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 8bffeb0..1967f0c 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -1499,6 +1499,7 @@ LRESULT WINAPI DefMDIChildProcA( HWND hwnd, UINT message, case WM_NEXTMENU: case WM_SYSCHAR: case WM_DESTROY: + case WM_ICONERASEBKGND: return DefMDIChildProcW( hwnd, message, wParam, lParam ); } return DefWindowProcA(hwnd, message, wParam, lParam); @@ -1656,6 +1657,16 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, } break;
+ case WM_ICONERASEBKGND: + { + RECT rect; + HDC hdc = (HDC)wParam; + HBRUSH hbr = CreateSolidBrush( GetSysColor(COLOR_BTNFACE) ); + GetClipBox( hdc, &rect ); + FillRect( hdc, &rect, hbr ); + return 1; + }
Why the job done by DefWindowProc is not enough?
--- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -823,7 +823,7 @@ static POINT WINPOS_FindIconPos( HWND hwnd, POINT pt )
hrgn = CreateRectRgn( 0, 0, 0, 0 ); tmp = CreateRectRgn( 0, 0, 0, 0 ); - for (child = GetWindow( parent, GW_HWNDFIRST ); child; child = GetWindow( child, GW_HWNDNEXT )) + for (child = GetWindow( parent, GW_CHILD ); child; child = GetWindow( child, GW_HWNDNEXT )) { WND *childPtr; if (child == hwnd) continue;
This change looks wrong.
@@ -2033,6 +2033,15 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) SetForegroundWindow( winpos->hwnd ); }
+ /* If the window is iconic don't any + * sizing are needed. bug #1719 + */ + if( IsIconic(winpos->hwnd) ) + { + winpos->flags |= SWP_NOCLIENTSIZE; + winpos->flags &= ~SWP_STATECHANGED; + } +
This requires a test case and an explanation why it's needed. -- Dmitry.
participants (1)
-
Dmitry Timoshkov