Rebase against 0c738d900a8daccf2c5460972033766d34d59aed.

This commit is contained in:
Zebediah Figura 2019-02-19 18:36:59 -06:00
parent b3c99ebf4b
commit 13b580a0c8
14 changed files with 26 additions and 1436 deletions

View File

@ -1,16 +1,16 @@
From 93ec896e73fe1b9ad7100e4ea22086e940eb8ef4 Mon Sep 17 00:00:00 2001
From e84ed4d3b01ef570a0dc235822c3b4d159c78cb1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 15 Aug 2015 07:41:17 +0200
Subject: [PATCH] gdi32: Perform lazy initialization of fonts to improve
startup performance.
---
dlls/gdi32/dc.c | 8 +++-----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++++++---------------
dlls/gdi32/dc.c | 8 +++----
dlls/gdi32/freetype.c | 49 ++++++++++++++++++++++++++++++-------------
2 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 8ee8a52..208c220 100644
index 8ee8a52d..208c2202 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -148,11 +148,9 @@ DC *alloc_dc_ptr( WORD magic )
@ -29,7 +29,7 @@ index 8ee8a52..208c220 100644
}
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 9f6bdfe..492d29e 100644
index 098faff3..fbdbf858 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -110,6 +110,9 @@
@ -42,7 +42,7 @@ index 9f6bdfe..492d29e 100644
#ifdef HAVE_FREETYPE
#ifndef HAVE_FT_TRUETYPEENGINETYPE
@@ -3264,6 +3267,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3266,6 +3269,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@ -50,7 +50,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3306,6 +3310,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3308,6 +3312,7 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
*/
HANDLE WineEngAddFontMemResourceEx(PVOID pbFont, DWORD cbFont, PVOID pdv, DWORD *pcFonts)
{
@ -58,7 +58,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3344,6 +3349,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
@@ -3346,6 +3351,7 @@ BOOL WineEngRemoveFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
{
INT ret = 0;
@ -66,7 +66,7 @@ index 9f6bdfe..492d29e 100644
GDI_CheckNotLock();
if (ft_handle) /* do it only if we have freetype up and running */
@@ -3665,10 +3671,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
@@ -3667,10 +3673,13 @@ static BOOL create_fot( const WCHAR *resource, const WCHAR *font_file, const str
BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
LPCWSTR font_file, LPCWSTR font_path )
{
@ -81,16 +81,16 @@ index 9f6bdfe..492d29e 100644
if (!unix_name || !get_fontdir( unix_name, &fontdir ))
SetLastError( ERROR_INVALID_PARAMETER );
else
@@ -4174,8 +4183,6 @@ static BOOL init_freetype(void)
FT_SimpleVersion = ((FT_Version.major << 16) & 0xff0000) |
((FT_Version.minor << 8) & 0x00ff00) |
((FT_Version.patch ) & 0x0000ff);
@@ -4184,8 +4193,6 @@ static BOOL init_freetype(void)
FT_UInt interpreter_version = 35;
pFT_Property_Set( library, "truetype", "interpreter-version", &interpreter_version );
}
-
- font_driver = &freetype_funcs;
return TRUE;
sym_not_found:
@@ -4361,21 +4368,13 @@ static void reorder_font_list(void)
@@ -4371,21 +4378,13 @@ static void reorder_font_list(void)
default_sans = set_default( default_sans_list );
}
@ -114,7 +114,7 @@ index 9f6bdfe..492d29e 100644
#ifdef SONAME_LIBFONTCONFIG
init_fontconfig();
@@ -4401,7 +4400,7 @@ BOOL WineEngInit(void)
@@ -4411,7 +4410,7 @@ BOOL WineEngInit(void)
if((font_mutex = CreateMutexW(NULL, FALSE, font_mutex_nameW)) == NULL)
{
ERR("Failed to create font mutex\n");
@ -123,7 +123,7 @@ index 9f6bdfe..492d29e 100644
}
WaitForSingleObject(font_mutex, INFINITE);
@@ -4428,6 +4427,21 @@ BOOL WineEngInit(void)
@@ -4438,6 +4437,21 @@ BOOL WineEngInit(void)
return TRUE;
}
@ -145,7 +145,7 @@ index 9f6bdfe..492d29e 100644
/* Some fonts have large usWinDescent values, as a result of storing signed short
in unsigned field. That's probably caused by sTypoDescent vs usWinDescent confusion in
some font generation tools. */
@@ -5124,8 +5138,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
@@ -5180,8 +5194,12 @@ static BOOL select_charmap(FT_Face ft_face, FT_Encoding encoding)
static BOOL freetype_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
LPCWSTR output, const DEVMODEW *devmode )
{
@ -159,7 +159,7 @@ index 9f6bdfe..492d29e 100644
if (!physdev) return FALSE;
push_dc_driver( dev, &physdev->dev, &freetype_funcs );
return TRUE;
@@ -8627,6 +8645,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
@@ -8718,6 +8736,7 @@ static BOOL freetype_FontIsLinked( PHYSDEV dev )
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
{
@ -168,5 +168,5 @@ index 9f6bdfe..492d29e 100644
lprs->wFlags = TT_AVAILABLE | TT_ENABLED;
lprs->nLanguageID = 0;
--
1.9.1
2.20.1

View File

@ -1,4 +1,4 @@
From e5df77725c34e82d7d796b514118be6fece16386 Mon Sep 17 00:00:00 2001
From 0e78ff26dc69402d31b691f0fec956d516bcd1de Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dtimoshkov@codeweavers.com>
Date: Mon, 28 Jul 2003 07:39:25 -0500
Subject: [PATCH] libs: Fix most problems with CompareString.
@ -9,7 +9,7 @@ Subject: [PATCH] libs: Fix most problems with CompareString.
2 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index f5d54e06..2f61e1c9 100644
index 2627fc5d..c90223e6 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1963,13 +1963,13 @@ static void test_CompareStringA(void)
@ -29,10 +29,10 @@ index f5d54e06..2f61e1c9 100644
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
@@ -5814,6 +5814,5 @@ START_TEST(locale)
test_FindStringOrdinal();
@@ -6020,6 +6020,5 @@ START_TEST(locale)
test_SetThreadUILanguage();
test_NormalizeString();
test_SpecialCasing();
- /* this requires collation table patch to make it MS compatible */
- if (0) test_sorting();
+ test_sorting();
@ -168,5 +168,5 @@ index 465d7400..f354a75f 100644
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
--
2.19.1
2.20.1

View File

@ -1,65 +0,0 @@
From e4bd4d8277a24e36bf1e58b99a8b32093eb1e771 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 14 Jan 2019 15:04:56 +1100
Subject: [PATCH] oleaut32: Support VT_DECIMAL in VarRound
Based of a patch by Carlos Chiriboga Calderon
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26653
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/oleaut32/tests/vartest.c | 4 ++--
dlls/oleaut32/variant.c | 14 ++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index c00968e..92e044b 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -3632,7 +3632,8 @@ static const struct decimal_round_t decimal_round_data[] = {
{{ 2, 0, 0, 0, 199 }, { 2, 0, 0, 0, 199 }, 2},
{{ 2, DECIMAL_NEG, 0, 0, 199 }, { 2, DECIMAL_NEG, 0, 0, 199 }, 2},
{{ 2, DECIMAL_NEG, 0, 0, 55 }, { 2, DECIMAL_NEG, 0, 0, 6 }, 1},
- {{ 2, 0, 0, 0, 55 }, { 2, 0, 0, 0, 6 }, 1}
+ {{ 2, 0, 0, 0, 55 }, { 2, 0, 0, 0, 6 }, 1},
+ {{ 2, 0, 0, 0, 1999 }, { 1, 0, 0, 0, 200 }, 1},
};
static void test_VarRound(void)
@@ -3735,7 +3736,6 @@ static void test_VarRound(void)
S1(U1(*pdec)).Lo32 = ptr->source.Lo32;
VariantInit(&vDst);
hres = pVarRound(&v, ptr->dec, &vDst);
- todo_wine
ok(hres == S_OK, "%d: got 0x%08x\n", i, hres);
if (hres == S_OK)
{
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index 8781f3e..fcbef53 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -5134,7 +5134,21 @@ HRESULT WINAPI VarRound(LPVARIANT pVarIn, int deci, LPVARIANT pVarOut)
}
V_VT(pVarOut) = V_VT(pVarIn);
break;
+ case VT_DECIMAL:
+ {
+ double dbl;
+ VarR8FromDec(&V_DECIMAL(pVarIn), &dbl);
+
+ if (dbl>0.0f)
+ dbl = floor(dbl*pow(10,deci)+0.5);
+ else
+ dbl = ceil(dbl*pow(10,deci)-0.5);
+
+ V_VT(pVarOut)=VT_DECIMAL;
+ VarDecFromR8(dbl, &V_DECIMAL(pVarOut));
+ break;
+ }
/* cases we don't know yet */
default:
FIXME("unimplemented part, V_VT(pVarIn) == 0x%X, deci == %d\n",
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [26653] oleaut32: Support VT_DECIMAL in VarRound

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "5e86cc0a8f37295072b03b1c13aa205ff3e6f3e4"
echo "0c738d900a8daccf2c5460972033766d34d59aed"
}
# Show version information
@ -246,7 +246,6 @@ patch_enable_all ()
enable_oleaut32_OLEPictureImpl_SaveAsFile="$1"
enable_oleaut32_OleLoadPicture="$1"
enable_oleaut32_OleLoadPictureFile="$1"
enable_oleaut32_VarRound="$1"
enable_opengl32_wglChoosePixelFormat="$1"
enable_packager_DllMain="$1"
enable_quartz_MediaSeeking_Positions="$1"
@ -891,9 +890,6 @@ patch_enable ()
oleaut32-OleLoadPictureFile)
enable_oleaut32_OleLoadPictureFile="$2"
;;
oleaut32-VarRound)
enable_oleaut32_VarRound="$2"
;;
opengl32-wglChoosePixelFormat)
enable_opengl32_wglChoosePixelFormat="$2"
;;
@ -5197,21 +5193,6 @@ if test "$enable_oleaut32_OleLoadPictureFile" -eq 1; then
) >> "$patchlist"
fi
# Patchset oleaut32-VarRound
# |
# | This patchset fixes the following Wine bugs:
# | * [#26653] oleaut32: Support VT_DECIMAL in VarRound
# |
# | Modified files:
# | * dlls/oleaut32/tests/vartest.c, dlls/oleaut32/variant.c
# |
if test "$enable_oleaut32_VarRound" -eq 1; then
patch_apply oleaut32-VarRound/0001-oleaut32-Support-VT_DECIMAL-in-VarRound.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "oleaut32: Support VT_DECIMAL in VarRound.", 1 },';
) >> "$patchlist"
fi
# Patchset opengl32-wglChoosePixelFormat
# |
# | This patchset fixes the following Wine bugs:
@ -6372,31 +6353,11 @@ fi
# | * [#7287] Redundant "tabs" appear with tabbed MDI (test with LTSpice)
# |
# | Modified files:
# | * dlls/user32/controls.h, dlls/user32/icontitle.c, dlls/user32/nonclient.c, dlls/user32/tests/win.c, dlls/user32/win.c,
# | dlls/user32/win.h, dlls/user32/winpos.c, dlls/wineandroid.drv/window.c, dlls/wineandroid.drv/wineandroid.drv.spec,
# | dlls/winemac.drv/window.c, dlls/winex11.drv/window.c
# | * dlls/user32/winpos.c
# |
if test "$enable_user32_minimized_windows" -eq 1; then
patch_apply user32-minimized_windows/0002-user32-SetWindowPos-shouldn-t-change-the-client-rect.patch
patch_apply user32-minimized_windows/0003-user32-Correctly-calculate-the-client-size-of-a-mini.patch
patch_apply user32-minimized_windows/0004-user32-Use-the-C-XY-MINIMIZED-rather-than-C-XY-ICON-.patch
patch_apply user32-minimized_windows/0005-user32-AdjustWindowRect-shouldn-t-ignore-WS_MINIMIZE.patch
patch_apply user32-minimized_windows/0010-user32-Reimplement-ArrangeIconicWindows-using-minimi.patch
patch_apply user32-minimized_windows/0011-user32-Correctly-place-minimized-windows.patch
patch_apply user32-minimized_windows/0012-user32-Paint-title-bars-for-minimized-windows.patch
patch_apply user32-minimized_windows/0013-user32-Allow-clicking-the-restore-and-maximize-boxes.patch
patch_apply user32-minimized_windows/0014-user32-Get-rid-of-icon-titles.patch
patch_apply user32-minimized_windows/0015-user32-Move-iconic-windows-as-their-border-instead-o.patch
(
printf '%s\n' '+ { "Zebediah Figura", "user32: SetWindowPos() shouldn'\''t change the client rect of a minimized window.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Correctly calculate the client size of a minimized window.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Use the C[XY]MINIMIZED rather than C[XY]ICON size for minimized windows.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: AdjustWindowRect() shouldn'\''t ignore WS_MINIMIZE.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Reimplement ArrangeIconicWindows() using minimized metrics.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Correctly place minimized windows.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Paint title bars for minimized windows.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Allow clicking the restore and maximize boxes for on minimized windows.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Get rid of icon titles.", 1 },';
printf '%s\n' '+ { "Zebediah Figura", "user32: Move iconic windows as their border instead of their icon.", 1 },';
) >> "$patchlist"
fi

View File

@ -1,51 +0,0 @@
From dfa57f43321be68d80204bcc960e62b1f341b5ad Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 20 Dec 2017 23:51:26 -0600
Subject: [PATCH 02/15] user32: SetWindowPos() shouldn't change the client rect
of a minimized window.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/tests/win.c | 12 ++++++++++++
dlls/user32/winpos.c | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 85b2b3a514..5f34b11e4b 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6503,6 +6503,18 @@ static void test_ShowWindow(void)
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
todo_wine
+ ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
+ wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
+ /* SetWindowPos shouldn't affect the client rect */
+ ret = SetWindowPos(hwnd, 0, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
+ ok(ret, "not expected ret: %lu\n", ret);
+ GetWindowRect(hwnd, &rc);
+ todo_wine
+ ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
+ wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
+ GetClientRect(hwnd, &rc);
+ todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 4b39d0aa39..38444b243f 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1699,7 +1699,7 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS *pWinpos, RECT *old_window_rect, REC
WIN_GetRectangles( pWinpos->hwnd, COORDS_PARENT, old_window_rect, old_client_rect );
*new_window_rect = *old_window_rect;
- *new_client_rect = (wndPtr->dwStyle & WS_MINIMIZE) ? *old_window_rect : *old_client_rect;
+ *new_client_rect = *old_client_rect;
if (!(pWinpos->flags & SWP_NOSIZE))
{
--
2.19.2

View File

@ -1,115 +0,0 @@
From f3effe1fc888e89a32c8cad4c7af7e41d09f979a Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 20 Dec 2017 19:49:03 -0600
Subject: [PATCH 03/15] user32: Correctly calculate the client size of a
minimized window.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/nonclient.c | 5 +++++
dlls/user32/tests/win.c | 17 ++++++++++-------
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 4444a2c91e..26bb0a01b5 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -414,6 +414,11 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
if (winRect->left > winRect->right)
winRect->right = winRect->left;
}
+ else
+ {
+ winRect->right = winRect->left;
+ winRect->bottom = winRect->top;
+ }
return result;
}
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 5f34b11e4b..d17288abcc 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6488,7 +6488,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
/* shouldn't be able to resize minimized windows */
@@ -6502,7 +6501,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
/* SetWindowPos shouldn't affect the client rect */
@@ -6514,7 +6512,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
@@ -6606,7 +6603,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
@@ -6622,7 +6618,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
@@ -6665,7 +6660,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
@@ -6684,7 +6678,6 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
@@ -9925,6 +9918,7 @@ static void test_hide_window(void)
static void test_minimize_window(HWND hwndMain)
{
HWND hwnd, hwnd2, hwnd3;
+ RECT rc, rc_expect;
hwnd = CreateWindowExA(0, "MainWindowClass", "Main window", WS_POPUP | WS_VISIBLE,
100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL);
@@ -10033,6 +10027,15 @@ static void test_minimize_window(HWND hwndMain)
DestroyWindow(hwnd3);
DestroyWindow(hwnd2);
DestroyWindow(hwnd);
+
+ /* test NC area */
+ ShowWindow(hwndMain, SW_MINIMIZE);
+ GetWindowRect(hwndMain, &rc);
+ SetRect(&rc_expect, rc.left, rc.top, rc.left, rc.top);
+ DefWindowProcA(hwndMain, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ok(EqualRect(&rc, &rc_expect), "expected %s, got %s\n",
+ wine_dbgstr_rect(&rc_expect), wine_dbgstr_rect(&rc));
+ ShowWindow(hwndMain, SW_RESTORE);
}
static void test_desktop( void )
--
2.19.2

View File

@ -1,96 +0,0 @@
From 9e69106979756e7a78e724a6773c557aef83f367 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 20 Dec 2017 17:15:11 -0600
Subject: [PATCH 04/15] user32: Use the C[XY]MINIMIZED rather than C[XY]ICON
size for minimized windows.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/tests/win.c | 5 -----
dlls/user32/winpos.c | 12 ++++++------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index d17288abcc..d8cbc3b010 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6484,7 +6484,6 @@ static void test_ShowWindow(void)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6497,7 +6496,6 @@ static void test_ShowWindow(void)
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "not expected ret: %lu\n", ret);
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6599,7 +6597,6 @@ static void test_ShowWindow(void)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6614,7 +6611,6 @@ static void test_ShowWindow(void)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6656,7 +6652,6 @@ static void test_ShowWindow(void)
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_MINIMIZE, "window should be minimized\n");
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 38444b243f..bca50ca12a 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -975,8 +975,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
wpl.ptMinPosition = WINPOS_FindIconPos( hwnd, wpl.ptMinPosition );
SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
- wpl.ptMinPosition.x + GetSystemMetrics(SM_CXICON),
- wpl.ptMinPosition.y + GetSystemMetrics(SM_CYICON) );
+ wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED),
+ wpl.ptMinPosition.y + GetSystemMetrics(SM_CYMINIMIZED) );
return SWP_NOSIZE | SWP_NOMOVE;
}
if (!SendMessageW( hwnd, WM_QUERYOPEN, 0, 0 )) return SWP_NOSIZE | SWP_NOMOVE;
@@ -1006,8 +1006,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
if (!(old_style & WS_MINIMIZE)) swpFlags |= SWP_STATECHANGED;
SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
- wpl.ptMinPosition.x + GetSystemMetrics(SM_CXICON),
- wpl.ptMinPosition.y + GetSystemMetrics(SM_CYICON) );
+ wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED),
+ wpl.ptMinPosition.y + GetSystemMetrics(SM_CYMINIMIZED) );
swpFlags |= SWP_NOCOPYBITS;
break;
@@ -1705,8 +1705,8 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS *pWinpos, RECT *old_window_rect, REC
{
if (wndPtr->dwStyle & WS_MINIMIZE)
{
- new_window_rect->right = new_window_rect->left + GetSystemMetrics(SM_CXICON);
- new_window_rect->bottom = new_window_rect->top + GetSystemMetrics(SM_CYICON);
+ new_window_rect->right = new_window_rect->left + GetSystemMetrics(SM_CXMINIMIZED);
+ new_window_rect->bottom = new_window_rect->top + GetSystemMetrics(SM_CYMINIMIZED);
}
else
{
--
2.19.2

View File

@ -1,50 +0,0 @@
From 823215d44e7b0e670aee7a6719fb4a99f1a5bcdf Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 20 Dec 2017 18:06:19 -0600
Subject: [PATCH 05/15] user32: AdjustWindowRect() shouldn't ignore
WS_MINIMIZE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/nonclient.c | 4 ----
dlls/user32/tests/win.c | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 26bb0a01b5..0dea3a2376 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -315,8 +315,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL
{
NONCLIENTMETRICSW ncm;
- if (style & WS_MINIMIZE) return TRUE;
-
TRACE("(%s) %08x %d %08x\n", wine_dbgstr_rect(rect), style, menu, exStyle );
ncm.cbSize = sizeof(ncm);
@@ -335,8 +333,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectExForDpi( LPRECT rect, DWORD style
{
NONCLIENTMETRICSW ncm;
- if (style & WS_MINIMIZE) return TRUE;
-
TRACE("(%s) %08x %d %08x %u\n", wine_dbgstr_rect(rect), style, menu, exStyle, dpi );
ncm.cbSize = sizeof(ncm);
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index d8cbc3b010..2687702ed8 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5297,7 +5297,7 @@ static void test_AWR_window_size(BOOL menu)
static void test_AWR_flags(void)
{
- static const DWORD styles[] = { WS_POPUP, WS_BORDER, WS_DLGFRAME, WS_THICKFRAME };
+ static const DWORD styles[] = { WS_POPUP, WS_BORDER, WS_DLGFRAME, WS_THICKFRAME, WS_MINIMIZE };
static const DWORD exStyles[] = { WS_EX_CLIENTEDGE, WS_EX_TOOLWINDOW, WS_EX_WINDOWEDGE,
WS_EX_APPWINDOW, WS_EX_DLGMODALFRAME, WS_EX_STATICEDGE };
--
2.19.2

View File

@ -1,227 +0,0 @@
From 2b5b700cf45de221633d1c1c24d61114f219ca2c Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 19 Dec 2018 12:57:36 -0600
Subject: [PATCH 10/15] user32: Reimplement ArrangeIconicWindows() using
minimized metrics.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/tests/win.c | 8 ----
dlls/user32/winpos.c | 103 ++++++++++++++++++++++++++++++----------
2 files changed, 77 insertions(+), 34 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index a1224557ab..4ba2d045f0 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -11328,7 +11328,6 @@ static void test_arrange_iconic_windows(void)
SetLastError(0xdeadbeef);
ret = ArrangeIconicWindows(parent);
-todo_wine
ok(!ret, "wrong ret %u\n", ret);
ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError());
@@ -11342,7 +11341,6 @@ todo_wine
SetLastError(0xdeadbeef);
ret = ArrangeIconicWindows(parent);
-todo_wine
ok(!ret, "wrong ret %u\n", ret);
ok(GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError());
@@ -11365,14 +11363,12 @@ todo_wine
}
ret = ArrangeIconicWindows(parent);
-todo_wine
ok(ret == 1, "wrong ret %u\n", ret);
GetWindowRect(hwnds[0], &rect);
SetRect(&expect, 0, 0, GetSystemMetrics(SM_CXMINIMIZED), GetSystemMetrics(SM_CYMINIMIZED));
OffsetRect(&expect, mm.iHorzGap, mm.iVertGap);
OffsetRect(&expect, pt.x, pt.y);
-todo_wine
ok(EqualRect(&rect, &expect), "expected rect %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -11394,7 +11390,6 @@ todo_wine
}
ret = ArrangeIconicWindows(parent);
-todo_wine
ok(ret == 10, "wrong ret %u\n", ret);
col = mm.iHorzGap;
@@ -11411,7 +11406,6 @@ todo_wine
SetRect(&expect, col, row, col + GetSystemMetrics(SM_CXMINIMIZED),
row + GetSystemMetrics(SM_CYMINIMIZED));
OffsetRect(&expect, pt.x, pt.y);
-todo_wine
ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i,
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -11431,7 +11425,6 @@ todo_wine
}
ret = ArrangeIconicWindows(parent);
-todo_wine
ok(ret == 10, "wrong ret %u\n", ret);
col = parent_rect.right - mm.iHorzGap;
@@ -11448,7 +11441,6 @@ todo_wine
SetRect(&expect, col - GetSystemMetrics(SM_CXMINIMIZED),
row - GetSystemMetrics(SM_CYMINIMIZED), col, row);
OffsetRect(&expect, pt.x, pt.y);
-todo_wine
ok(EqualRect(&rect, &expect), "hwnd %u: expected rect %s, got %s\n", i,
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index bca50ca12a..6d137d75d7 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -852,6 +852,75 @@ MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd )
return MinMax;
}
+static POINT get_first_minimized_child_pos( const RECT *parent, const MINIMIZEDMETRICS *mm,
+ int width, int height )
+{
+ POINT ret;
+
+ if (mm->iArrange & ARW_STARTRIGHT)
+ ret.x = parent->right - mm->iHorzGap - width;
+ else
+ ret.x = parent->left + mm->iHorzGap;
+ if (mm->iArrange & ARW_STARTTOP)
+ ret.y = parent->top + mm->iVertGap;
+ else
+ ret.y = parent->bottom - mm->iVertGap - height;
+
+ return ret;
+}
+
+static void get_next_minimized_child_pos( const RECT *parent, const MINIMIZEDMETRICS *mm,
+ int width, int height, POINT *pos )
+{
+ BOOL next;
+
+ if (mm->iArrange & ARW_UP) /* == ARW_DOWN */
+ {
+ if (mm->iArrange & ARW_STARTTOP)
+ {
+ pos->y += height + mm->iVertGap;
+ if ((next = pos->y + height > parent->bottom))
+ pos->y = parent->top + mm->iVertGap;
+ }
+ else
+ {
+ pos->y -= height + mm->iVertGap;
+ if ((next = pos->y < parent->top))
+ pos->y = parent->bottom - mm->iVertGap - height;
+ }
+
+ if (next)
+ {
+ if (mm->iArrange & ARW_STARTRIGHT)
+ pos->x -= width + mm->iHorzGap;
+ else
+ pos->x += width + mm->iHorzGap;
+ }
+ }
+ else
+ {
+ if (mm->iArrange & ARW_STARTRIGHT)
+ {
+ pos->x -= width + mm->iHorzGap;
+ if ((next = pos->x < parent->left))
+ pos->x = parent->right - mm->iHorzGap - width;
+ }
+ else
+ {
+ pos->x += width + mm->iHorzGap;
+ if ((next = pos->x + width > parent->right))
+ pos->x = parent->left + mm->iHorzGap;
+ }
+
+ if (next)
+ {
+ if (mm->iArrange & ARW_STARTTOP)
+ pos->y += height + mm->iVertGap;
+ else
+ pos->y -= height + mm->iVertGap;
+ }
+ }
+}
/***********************************************************************
* WINPOS_FindIconPos
@@ -2567,14 +2636,16 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
*/
UINT WINAPI ArrangeIconicWindows( HWND parent )
{
+ int width, height, count = 0;
RECT rectParent;
HWND hwndChild;
- INT x, y, xspacing, yspacing;
POINT pt;
MINIMIZEDMETRICS metrics;
metrics.cbSize = sizeof(metrics);
SystemParametersInfoW( SPI_GETMINIMIZEDMETRICS, sizeof(metrics), &metrics, 0 );
+ width = GetSystemMetrics( SM_CXMINIMIZED );
+ height = GetSystemMetrics( SM_CYMINIMIZED );
if (parent == GetDesktopWindow())
{
@@ -2587,41 +2658,21 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
}
else GetClientRect( parent, &rectParent );
- x = y = 0;
- xspacing = GetSystemMetrics(SM_CXICONSPACING);
- yspacing = GetSystemMetrics(SM_CYICONSPACING);
+ pt = get_first_minimized_child_pos( &rectParent, &metrics, width, height );
hwndChild = GetWindow( parent, GW_CHILD );
while (hwndChild)
{
if( IsIconic( hwndChild ) )
{
- WINPOS_ShowIconTitle( hwndChild, FALSE );
-
- if (metrics.iArrange & ARW_STARTRIGHT)
- pt.x = rectParent.right - (x + 1) * xspacing;
- else
- pt.x = rectParent.left + x * xspacing;
- if (metrics.iArrange & ARW_STARTTOP)
- pt.y = rectParent.top + y * yspacing;
- else
- pt.y = rectParent.bottom - (y + 1) * yspacing;
-
- SetWindowPos( hwndChild, 0, pt.x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2,
- pt.y + (yspacing - GetSystemMetrics(SM_CYICON)) / 2, 0, 0,
+ SetWindowPos( hwndChild, 0, pt.x, pt.y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
- if( IsWindow(hwndChild) )
- WINPOS_ShowIconTitle(hwndChild , TRUE );
-
- if (++x >= (rectParent.right - rectParent.left) / xspacing)
- {
- x = 0;
- y++;
- }
+ get_next_minimized_child_pos( &rectParent, &metrics, width, height, &pt );
+ count++;
}
hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
}
- return yspacing;
+ return count;
}
--
2.19.2

View File

@ -1,380 +0,0 @@
From e8ef3930a640e5802f83f14b4512878b9a321448 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 20 Dec 2017 23:11:19 -0600
Subject: [PATCH 11/15] user32: Correctly place minimized windows.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/tests/win.c | 11 --
dlls/user32/winpos.c | 128 +++++++++-------------
dlls/wineandroid.drv/window.c | 17 ---
dlls/wineandroid.drv/wineandroid.drv.spec | 1 -
dlls/winemac.drv/window.c | 10 +-
dlls/winex11.drv/window.c | 21 +---
6 files changed, 51 insertions(+), 137 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4ba2d045f0..0f3c2a9798 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6506,7 +6506,6 @@ static void test_ShowWindow(void)
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "not expected ret: %lu\n", ret);
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6669,7 +6668,6 @@ static void test_ShowWindow(void)
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_MINIMIZE, "window should be minimized\n");
GetWindowRect(hwnd, &rc);
- todo_wine
ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
GetClientRect(hwnd, &rc);
@@ -6731,14 +6729,12 @@ static void test_ShowWindow_owned(HWND hwndMain)
GetWindowRect(hwnd, &rect);
SetRect(&expect, 0, mon_info.rcWork.bottom - GetSystemMetrics(SM_CYMINIMIZED),
GetSystemMetrics(SM_CXMINIMIZED), mon_info.rcWork.bottom);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "wrong ret %d\n", ret);
GetWindowRect(hwnd, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -6753,7 +6749,6 @@ static void test_ShowWindow_owned(HWND hwndMain)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd2, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -6859,14 +6854,12 @@ static void test_ShowWindow_child(HWND hwndMain)
SetRect(&expect, 0, expect.bottom - GetSystemMetrics(SM_CYMINIMIZED),
GetSystemMetrics(SM_CXMINIMIZED), expect.bottom);
OffsetRect(&expect, pt.x, pt.y);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "wrong ret %d\n", ret);
GetWindowRect(hwnd, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -6881,7 +6874,6 @@ static void test_ShowWindow_child(HWND hwndMain)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd2, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -6984,14 +6976,12 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
SetRect(&expect, 0, expect.bottom - GetSystemMetrics(SM_CYMINIMIZED),
GetSystemMetrics(SM_CXMINIMIZED), expect.bottom);
OffsetRect(&expect, pt.x, pt.y);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
/* shouldn't be able to resize minimized windows */
ret = SetWindowPos(hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "wrong ret %d\n", ret);
GetWindowRect(hwnd, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
@@ -7006,7 +6996,6 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
ok(style & WS_MINIMIZE, "window should be minimized\n");
ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
GetWindowRect(hwnd2, &rect);
- todo_wine
ok(EqualRect(&expect, &rect), "expected %s, got %s\n",
wine_dbgstr_rect(&expect), wine_dbgstr_rect(&rect));
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 6d137d75d7..4f936f8d30 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -922,95 +922,64 @@ static void get_next_minimized_child_pos( const RECT *parent, const MINIMIZEDMET
}
}
-/***********************************************************************
- * WINPOS_FindIconPos
- *
- * Find a suitable place for an iconic window.
- */
-static POINT WINPOS_FindIconPos( HWND hwnd, POINT pt )
+/* detect whether another child window has already been minimized here */
+static BOOL find_minimized_child( HWND hwnd, HWND parent, POINT pt )
{
- RECT rect, rectParent;
- HWND parent, child;
- HRGN hrgn, tmp;
- int x, y, xspacing, yspacing;
- MINIMIZEDMETRICS metrics;
-
- metrics.cbSize = sizeof(metrics);
- SystemParametersInfoW( SPI_GETMINIMIZEDMETRICS, sizeof(metrics), &metrics, 0 );
-
- parent = GetAncestor( hwnd, GA_PARENT );
- if (parent == GetDesktopWindow())
- {
- MONITORINFO mon_info;
- HMONITOR monitor = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY );
-
- mon_info.cbSize = sizeof( mon_info );
- GetMonitorInfoW( monitor, &mon_info );
- rectParent = mon_info.rcWork;
- }
- else GetClientRect( parent, &rectParent );
-
- if ((pt.x >= rectParent.left) && (pt.x + GetSystemMetrics(SM_CXICON) < rectParent.right) &&
- (pt.y >= rectParent.top) && (pt.y + GetSystemMetrics(SM_CYICON) < rectParent.bottom))
- return pt; /* The icon already has a suitable position */
-
- xspacing = GetSystemMetrics(SM_CXICONSPACING);
- yspacing = GetSystemMetrics(SM_CYICONSPACING);
-
- /* Check if another icon already occupies this spot */
- /* FIXME: this is completely inefficient */
+ HWND child;
+ RECT rect;
- hrgn = CreateRectRgn( 0, 0, 0, 0 );
- tmp = CreateRectRgn( 0, 0, 0, 0 );
for (child = GetWindow( parent, GW_CHILD ); child; child = GetWindow( child, GW_HWNDNEXT ))
{
if (child == hwnd) continue;
if ((GetWindowLongW( child, GWL_STYLE ) & (WS_VISIBLE|WS_MINIMIZE)) != (WS_VISIBLE|WS_MINIMIZE))
continue;
- if (WIN_GetRectangles( child, COORDS_PARENT, &rect, NULL ))
+ if (WIN_GetRectangles( child, COORDS_PARENT, &rect, NULL )
+ && pt.x >= rect.left && pt.x < rect.right && pt.y >= rect.top && pt.y < rect.bottom)
{
- SetRectRgn( tmp, rect.left, rect.top, rect.right, rect.bottom );
- CombineRgn( hrgn, hrgn, tmp, RGN_OR );
+ return TRUE;
}
}
- DeleteObject( tmp );
- for (y = 0; y < (rectParent.bottom - rectParent.top) / yspacing; y++)
+ return FALSE;
+}
+
+static POINT get_minimized_pos( HWND hwnd )
+{
+ MINIMIZEDMETRICS metrics;
+ int width, height;
+ HWND parent;
+ RECT rect;
+ POINT pt;
+
+ if ((parent = GetAncestor( hwnd, GA_PARENT )) && parent != GetDesktopWindow())
{
- if (metrics.iArrange & ARW_STARTTOP)
- {
- rect.top = rectParent.top + y * yspacing;
- rect.bottom = rect.top + yspacing;
- }
- else
- {
- rect.bottom = rectParent.bottom - y * yspacing;
- rect.top = rect.bottom - yspacing;
- }
- for (x = 0; x < (rectParent.right - rectParent.left) / xspacing; x++)
- {
- if (metrics.iArrange & ARW_STARTRIGHT)
- {
- rect.right = rectParent.right - x * xspacing;
- rect.left = rect.right - xspacing;
- }
- else
- {
- rect.left = rectParent.left + x * xspacing;
- rect.right = rect.left + xspacing;
- }
- if (!RectInRegion( hrgn, &rect ))
- {
- /* No window was found, so it's OK for us */
- pt.x = rect.left + (xspacing - GetSystemMetrics(SM_CXICON)) / 2;
- pt.y = rect.top + (yspacing - GetSystemMetrics(SM_CYICON)) / 2;
- DeleteObject( hrgn );
- return pt;
- }
- }
+ GetClientRect( parent, &rect );
}
- DeleteObject( hrgn );
- pt.x = pt.y = 0;
+ else if (GetWindow( hwnd, GW_OWNER ))
+ {
+ MONITORINFO mon_info;
+ HMONITOR monitor = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY );
+
+ mon_info.cbSize = sizeof(mon_info);
+ GetMonitorInfoW( monitor, &mon_info );
+ rect = mon_info.rcWork;
+ }
+ else
+ {
+ pt.x = pt.y = -32000;
+ return pt;
+ }
+
+ width = GetSystemMetrics( SM_CXMINIMIZED );
+ height = GetSystemMetrics( SM_CYMINIMIZED );
+
+ metrics.cbSize = sizeof(metrics);
+ SystemParametersInfoW( SPI_GETMINIMIZEDMETRICS, sizeof(metrics), &metrics, 0 );
+
+ pt = get_first_minimized_child_pos( &rect, &metrics, width, height );
+ while (find_minimized_child( hwnd, parent, pt ))
+ get_next_minimized_child_pos( &rect, &metrics, width, height, &pt );
+
return pt;
}
@@ -1041,7 +1010,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
case SW_SHOWMINIMIZED:
case SW_FORCEMINIMIZE:
case SW_MINIMIZE:
- wpl.ptMinPosition = WINPOS_FindIconPos( hwnd, wpl.ptMinPosition );
+ wpl.ptMinPosition = get_minimized_pos( hwnd );
SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED),
@@ -1071,7 +1040,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
old_style = WIN_SetStyle( hwnd, WS_MINIMIZE, WS_MAXIMIZE );
- wpl.ptMinPosition = WINPOS_FindIconPos( hwnd, wpl.ptMinPosition );
+ wpl.ptMinPosition = get_minimized_pos( hwnd );
if (!(old_style & WS_MINIMIZE)) swpFlags |= SWP_STATECHANGED;
SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
@@ -1220,7 +1189,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
if (!IsWindow( hwnd )) goto done;
}
- swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp );
+ if (!IsIconic( hwnd ))
+ swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp );
parent = GetAncestor( hwnd, GA_PARENT );
if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED))
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index 861b216852..04bdad62b6 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -1380,23 +1380,6 @@ void CDECL ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flag
}
-/***********************************************************************
- * ANDROID_ShowWindow
- */
-UINT CDECL ANDROID_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
-{
- if (IsRectEmpty( rect )) return swp;
- if (!IsIconic( hwnd )) return swp;
- /* always hide icons off-screen */
- if (rect->left != -32000 || rect->top != -32000)
- {
- OffsetRect( rect, -32000 - rect->left, -32000 - rect->top );
- swp &= ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
- }
- return swp;
-}
-
-
/*****************************************************************
* ANDROID_SetParent
*/
diff --git a/dlls/wineandroid.drv/wineandroid.drv.spec b/dlls/wineandroid.drv/wineandroid.drv.spec
index 00de23de27..50d7668373 100644
--- a/dlls/wineandroid.drv/wineandroid.drv.spec
+++ b/dlls/wineandroid.drv/wineandroid.drv.spec
@@ -22,7 +22,6 @@
@ cdecl SetParent(long long long) ANDROID_SetParent
@ cdecl SetWindowRgn(long long long) ANDROID_SetWindowRgn
@ cdecl SetWindowStyle(ptr long ptr) ANDROID_SetWindowStyle
-@ cdecl ShowWindow(long long ptr long) ANDROID_ShowWindow
@ cdecl UpdateLayeredWindow(long ptr ptr) ANDROID_UpdateLayeredWindow
@ cdecl WindowMessage(long long long long) ANDROID_WindowMessage
@ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) ANDROID_WindowPosChanging
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c
index 6dbc432a1e..6a13d955f3 100644
--- a/dlls/winemac.drv/window.c
+++ b/dlls/winemac.drv/window.c
@@ -1794,15 +1794,7 @@ UINT CDECL macdrv_ShowWindow(HWND hwnd, INT cmd, RECT *rect, UINT swp)
if (!data || !data->cocoa_window) goto done;
if (IsRectEmpty(rect)) goto done;
- if (GetWindowLongW(hwnd, GWL_STYLE) & WS_MINIMIZE)
- {
- if (rect->left != -32000 || rect->top != -32000)
- {
- OffsetRect(rect, -32000 - rect->left, -32000 - rect->top);
- swp &= ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
- }
- goto done;
- }
+ if (GetWindowLongW(hwnd, GWL_STYLE) & WS_MINIMIZE) goto done;
if (!data->on_screen) goto done;
/* only fetch the new rectangle if the ShowWindow was a result of an external event */
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 1a61b6cf2c..7e08abdfa2 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2443,17 +2443,6 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
release_win_data( data );
}
-/* check if the window icon should be hidden (i.e. moved off-screen) */
-static BOOL hide_icon( struct x11drv_win_data *data )
-{
- static const WCHAR trayW[] = {'S','h','e','l','l','_','T','r','a','y','W','n','d',0};
-
- if (data->managed) return TRUE;
- /* hide icons in desktop mode when the taskbar is active */
- if (root_window == DefaultRootWindow( gdi_display )) return FALSE;
- return IsWindowVisible( FindWindowW( trayW, NULL ));
-}
-
/***********************************************************************
* ShowWindow (X11DRV.@)
*/
@@ -2469,15 +2458,7 @@ UINT CDECL X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
if (!data || !data->whole_window) goto done;
if (IsRectEmpty( rect )) goto done;
- if (style & WS_MINIMIZE)
- {
- if (((rect->left != -32000 || rect->top != -32000)) && hide_icon( data ))
- {
- OffsetRect( rect, -32000 - rect->left, -32000 - rect->top );
- swp &= ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
- }
- goto done;
- }
+ if (style & WS_MINIMIZE) goto done;
if (!data->managed || !data->mapped || data->iconic) goto done;
/* only fetch the new rectangle if the ShowWindow was a result of a window manager event */
--
2.19.2

View File

@ -1,86 +0,0 @@
From 11e03f7ce94b82413b808a30cc4ee10203fc2373 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 19 Dec 2018 14:52:18 -0600
Subject: [PATCH 12/15] user32: Paint title bars for minimized windows.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/nonclient.c | 34 ++++++++++------------------------
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 0dea3a2376..0e15e954fa 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -430,8 +430,6 @@ static void NC_GetInsideRect( HWND hwnd, enum coords_relative relative, RECT *re
{
WIN_GetRectangles( hwnd, relative, rect, NULL );
- if (style & WS_MINIMIZE) return;
-
/* Remove frame from rectangle */
if (HAS_THICKFRAME( style, ex_style ))
{
@@ -955,9 +953,6 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip )
flags = wndPtr->flags;
WIN_ReleasePtr( wndPtr );
- if ( dwStyle & WS_MINIMIZE ||
- !WIN_IsWindowDrawable( hwnd, 0 )) return; /* Nothing to do */
-
active = flags & WIN_NCACTIVATED;
TRACE("%p %d\n", hwnd, active );
@@ -1065,10 +1060,7 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip)
if( dwStyle & WS_VISIBLE )
{
- if( dwStyle & WS_MINIMIZE )
- WINPOS_RedrawIconTitle( hwnd );
- else
- NC_DoNCPaint( hwnd, clip );
+ NC_DoNCPaint( hwnd, clip );
if (parent == GetDesktopWindow())
PostMessageW( parent, WM_PARENTNOTIFY, WM_NCPAINT, (LPARAM)hwnd );
@@ -1097,10 +1089,7 @@ LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
*/
if (lParam != -1)
{
- if (IsIconic(hwnd))
- WINPOS_RedrawIconTitle( hwnd );
- else
- NC_DoNCPaint( hwnd, (HRGN)1 );
+ NC_DoNCPaint( hwnd, (HRGN)1 );
if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow())
PostMessageW( GetDesktopWindow(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
@@ -1372,17 +1361,14 @@ LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
}
case HTSYSMENU:
- if( style & WS_SYSMENU )
- {
- if( !(style & WS_MINIMIZE) )
- {
- HDC hDC = GetWindowDC(hwnd);
- NC_DrawSysButton( hwnd, hDC, TRUE );
- ReleaseDC( hwnd, hDC );
- }
- SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam );
- }
- break;
+ if (style & WS_SYSMENU)
+ {
+ HDC hDC = GetWindowDC( hwnd );
+ NC_DrawSysButton( hwnd, hDC, TRUE );
+ ReleaseDC( hwnd, hDC );
+ SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam );
+ }
+ break;
case HTMENU:
SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU, lParam );
--
2.19.2

View File

@ -1,43 +0,0 @@
From 0f07118d46c8ade3c2ed5f0fc295941d5cb9a4d7 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 19 Dec 2018 14:58:03 -0600
Subject: [PATCH 13/15] user32: Allow clicking the restore and maximize boxes
for on minimized windows.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/nonclient.c | 1 -
dlls/user32/winpos.c | 5 -----
2 files changed, 6 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 0e15e954fa..372b1be707 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -473,7 +473,6 @@ LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt )
style = GetWindowLongW( hwnd, GWL_STYLE );
ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
- if (style & WS_MINIMIZE) return HTCAPTION;
if (PtInRect( &rcClient, pt )) return HTCLIENT;
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 4f936f8d30..656064ebec 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -305,11 +305,6 @@ HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest )
LONG style = GetWindowLongW( list[i], GWL_STYLE );
/* If window is minimized or disabled, return at once */
- if (style & WS_MINIMIZE)
- {
- *hittest = HTCAPTION;
- break;
- }
if (style & WS_DISABLED)
{
*hittest = HTERROR;
--
2.19.2

View File

@ -1,257 +0,0 @@
From 40e3c499a335c847e2c5587a49116afba72b2aed Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 19 Dec 2018 15:10:53 -0600
Subject: [PATCH 14/15] user32: Get rid of icon titles.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/user32/controls.h | 3 --
dlls/user32/icontitle.c | 26 ---------------
dlls/user32/win.c | 3 --
dlls/user32/win.h | 2 --
dlls/user32/winpos.c | 74 -----------------------------------------
5 files changed, 108 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index 164164506e..d372bafcef 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -155,9 +155,6 @@ extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) DECLSPEC_HIDDEN;
/* desktop */
extern BOOL update_wallpaper( const WCHAR *wallpaper, const WCHAR *pattern ) DECLSPEC_HIDDEN;
-/* icon title */
-extern HWND ICONTITLE_Create( HWND hwnd ) DECLSPEC_HIDDEN;
-
/* menu controls */
extern HWND MENU_IsMenuActive(void) DECLSPEC_HIDDEN;
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c
index 77e286ebc1..e10717de41 100644
--- a/dlls/user32/icontitle.c
+++ b/dlls/user32/icontitle.c
@@ -51,32 +51,6 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
0 /* brush */
};
-
-
-/***********************************************************************
- * ICONTITLE_Create
- */
-HWND ICONTITLE_Create( HWND owner )
-{
- HWND hWnd;
- HINSTANCE instance = (HINSTANCE)GetWindowLongPtrA( owner, GWLP_HINSTANCE );
- LONG style = WS_CLIPSIBLINGS;
-
- if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
- if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
- hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
- style | WS_CHILD, 0, 0, 1, 1,
- GetParent(owner), 0, instance, NULL );
- else
- hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
- style, 0, 0, 1, 1,
- owner, 0, instance, NULL );
- WIN_SetOwner( hWnd, owner ); /* MDI depends on this */
- SetWindowLongW( hWnd, GWL_STYLE,
- GetWindowLongW( hWnd, GWL_STYLE ) & ~(WS_CAPTION | WS_BORDER) );
- return hWnd;
-}
-
/***********************************************************************
* ICONTITLE_SetTitlePos
*/
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index dd6142d16c..24b2a2ffd5 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -970,7 +970,6 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
WND *wndPtr;
HWND *list;
HMENU menu = 0, sys_menu;
- HWND icon_title;
struct window_surface *surface;
TRACE("%p\n", hwnd );
@@ -1018,7 +1017,6 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
sys_menu = wndPtr->hSysMenu;
free_dce( wndPtr->dce, hwnd );
wndPtr->dce = NULL;
- icon_title = wndPtr->icon_title;
HeapFree( GetProcessHeap(), 0, wndPtr->text );
wndPtr->text = NULL;
HeapFree( GetProcessHeap(), 0, wndPtr->pScroll );
@@ -1028,7 +1026,6 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
wndPtr->surface = NULL;
WIN_ReleasePtr( wndPtr );
- if (icon_title) DestroyWindow( icon_title );
if (menu) DestroyMenu( menu );
if (sys_menu) DestroyMenu( sys_menu );
if (surface)
diff --git a/dlls/user32/win.h b/dlls/user32/win.h
index f3bdfd38d9..81b08fc95e 100644
--- a/dlls/user32/win.h
+++ b/dlls/user32/win.h
@@ -49,7 +49,6 @@ typedef struct tagWND
RECT normal_rect; /* Normal window rect saved when maximized/minimized */
POINT min_pos; /* Position for minimized window */
POINT max_pos; /* Position for maximized window */
- HWND icon_title; /* Icon title window */
LPWSTR text; /* Window text */
void *pScroll; /* Scroll-bar info */
DWORD dwStyle; /* Window style (from CreateWindow) */
@@ -120,7 +119,6 @@ static inline void WIN_ReleasePtr( WND *ptr )
extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
-extern BOOL WINPOS_RedrawIconTitle( HWND hWnd ) DECLSPEC_HIDDEN;
extern MINMAXINFO WINPOS_GetMinMaxInfo( HWND hwnd ) DECLSPEC_HIDDEN;
extern LONG WINPOS_HandleWindowPosChanging(HWND hwnd, WINDOWPOS *winpos) DECLSPEC_HIDDEN;
extern HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest ) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 656064ebec..a36ee178f6 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -678,67 +678,6 @@ BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy,
}
-/***********************************************************************
- * WINPOS_RedrawIconTitle
- */
-BOOL WINPOS_RedrawIconTitle( HWND hWnd )
-{
- HWND icon_title = 0;
- WND *win = WIN_GetPtr( hWnd );
-
- if (win && win != WND_OTHER_PROCESS && win != WND_DESKTOP)
- {
- icon_title = win->icon_title;
- WIN_ReleasePtr( win );
- }
- if (!icon_title) return FALSE;
- SendMessageW( icon_title, WM_SHOWWINDOW, TRUE, 0 );
- InvalidateRect( icon_title, NULL, TRUE );
- return TRUE;
-}
-
-/***********************************************************************
- * WINPOS_ShowIconTitle
- */
-static void WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow )
-{
- WND *win = WIN_GetPtr( hwnd );
- HWND title = 0;
-
- TRACE("%p %i\n", hwnd, (bShow != 0) );
-
- if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP) return;
- if (win->window_rect.left == -32000 || win->window_rect.top == -32000)
- {
- TRACE( "not showing title for hidden icon %p\n", hwnd );
- bShow = FALSE;
- }
- else title = win->icon_title;
- WIN_ReleasePtr( win );
-
- if (bShow)
- {
- if (!title)
- {
- title = ICONTITLE_Create( hwnd );
- if (!(win = WIN_GetPtr( hwnd )) || win == WND_OTHER_PROCESS)
- {
- DestroyWindow( title );
- return;
- }
- win->icon_title = title;
- WIN_ReleasePtr( win );
- }
- if (!IsWindowVisible(title))
- {
- SendMessageW( title, WM_SHOWWINDOW, TRUE, 0 );
- SetWindowPos( title, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW );
- }
- }
- else if (title) ShowWindow( title, SW_HIDE );
-}
-
/*******************************************************************
* WINPOS_GetMinMaxInfo
*
@@ -1052,10 +991,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
old_style = WIN_SetStyle( hwnd, WS_MAXIMIZE, WS_MINIMIZE );
if (old_style & WS_MINIMIZE)
- {
win_set_flags( hwnd, WIN_RESTORE_MAX, 0 );
- WINPOS_ShowIconTitle( hwnd, FALSE );
- }
if (!(old_style & WS_MAXIMIZE)) swpFlags |= SWP_STATECHANGED;
SetRect( rect, minmax.ptMaxPosition.x, minmax.ptMaxPosition.y,
@@ -1071,7 +1007,6 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
old_style = WIN_SetStyle( hwnd, 0, WS_MINIMIZE | WS_MAXIMIZE );
if (old_style & WS_MINIMIZE)
{
- WINPOS_ShowIconTitle( hwnd, FALSE );
if (win_get_flags( hwnd ) & WIN_RESTORE_MAX)
{
/* Restore to maximized position */
@@ -1202,8 +1137,6 @@ static BOOL show_window( HWND hwnd, INT cmd )
{
HWND hFocus;
- WINPOS_ShowIconTitle( hwnd, FALSE );
-
/* FIXME: This will cause the window to be activated irrespective
* of whether it is owned by the same thread. Has to be done
* asynchronously.
@@ -1223,8 +1156,6 @@ static BOOL show_window( HWND hwnd, INT cmd )
goto done;
}
- if (IsIconic(hwnd)) WINPOS_ShowIconTitle( hwnd, TRUE );
-
if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) goto done;
if (wndPtr->flags & WIN_NEED_SIZE)
@@ -1477,7 +1408,6 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f
{
if (flags & PLACE_MIN)
{
- WINPOS_ShowIconTitle( hwnd, FALSE );
SetWindowPos( hwnd, 0, wp.ptMinPosition.x, wp.ptMinPosition.y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
}
@@ -1498,8 +1428,6 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f
if (IsIconic( hwnd ))
{
- if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE) WINPOS_ShowIconTitle( hwnd, TRUE );
-
/* SDK: ...valid only the next time... */
if( wndpl->flags & WPF_RESTORETOMAXIMIZED )
win_set_flags( hwnd, WIN_RESTORE_MAX, 0 );
@@ -2947,7 +2875,6 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
{
hOldCursor = SetCursor(hDragCursor);
ShowCursor( TRUE );
- WINPOS_ShowIconTitle( hwnd, FALSE );
}
else if(!DragFullWindows)
draw_moving_frame( parent, hdc, &sizingRect, thickframe );
@@ -3051,6 +2978,5 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
SendMessageW( hwnd, WM_SYSCOMMAND,
SC_MOUSEMENU + HTSYSMENU, MAKELONG(pt.x,pt.y));
}
- else WINPOS_ShowIconTitle( hwnd, TRUE );
}
}
--
2.19.2