1 From 58b26fbad3096b365bd0d7ee5fcd77752b2519fc Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Tue, 23 Sep 2008 09:24:06 -0500
4 Subject: [PATCH] user32: hack to hide minimized window icons
7 dlls/user32/winpos.c | 54 +------------------------------------------------
8 1 files changed, 2 insertions(+), 52 deletions(-)
10 diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
11 index 4f5005c..4128a28 100644
12 --- a/dlls/user32/winpos.c
13 +++ b/dlls/user32/winpos.c
14 @@ -778,58 +778,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
16 static POINT WINPOS_FindIconPos( HWND hwnd, POINT pt )
18 - RECT rect, rectParent;
21 - int xspacing, yspacing;
23 - parent = GetAncestor( hwnd, GA_PARENT );
24 - GetClientRect( parent, &rectParent );
25 - if ((pt.x >= rectParent.left) && (pt.x + GetSystemMetrics(SM_CXICON) < rectParent.right) &&
26 - (pt.y >= rectParent.top) && (pt.y + GetSystemMetrics(SM_CYICON) < rectParent.bottom))
27 - return pt; /* The icon already has a suitable position */
29 - xspacing = GetSystemMetrics(SM_CXICONSPACING);
30 - yspacing = GetSystemMetrics(SM_CYICONSPACING);
32 - /* Check if another icon already occupies this spot */
33 - /* FIXME: this is completely inefficient */
35 - hrgn = CreateRectRgn( 0, 0, 0, 0 );
36 - tmp = CreateRectRgn( 0, 0, 0, 0 );
37 - for (child = GetWindow( parent, GW_HWNDFIRST ); child; child = GetWindow( child, GW_HWNDNEXT ))
40 - if (child == hwnd) continue;
41 - if ((GetWindowLongW( child, GWL_STYLE ) & (WS_VISIBLE|WS_MINIMIZE)) != (WS_VISIBLE|WS_MINIMIZE))
43 - if (!(childPtr = WIN_GetPtr( child )) || childPtr == WND_OTHER_PROCESS)
45 - SetRectRgn( tmp, childPtr->rectWindow.left, childPtr->rectWindow.top,
46 - childPtr->rectWindow.right, childPtr->rectWindow.bottom );
47 - CombineRgn( hrgn, hrgn, tmp, RGN_OR );
48 - WIN_ReleasePtr( childPtr );
50 - DeleteObject( tmp );
52 - for (rect.bottom = rectParent.bottom; rect.bottom >= yspacing; rect.bottom -= yspacing)
54 - for (rect.left = rectParent.left; rect.left <= rectParent.right - xspacing; rect.left += xspacing)
56 - rect.right = rect.left + xspacing;
57 - rect.top = rect.bottom - yspacing;
58 - if (!RectInRegion( hrgn, &rect ))
60 - /* No window was found, so it's OK for us */
61 - pt.x = rect.left + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
62 - pt.y = rect.top + (yspacing - GetSystemMetrics(SM_CYICON)) / 2;
63 - DeleteObject( hrgn );
68 - DeleteObject( hrgn );
70 + pt.x = GetSystemMetrics(SM_CXVIRTUALSCREEN)+1;
71 + pt.y = GetSystemMetrics(SM_CYVIRTUALSCREEN)+1;