winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2017
----- 2025 -----
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
450 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/updown: Reset control width conditionally on UDM_SETBUDDY with NULL buddy handle.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: 030488bc76156248170c4cc030bc8049e81a52d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=030488bc76156248170c4cc0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 21 12:14:45 2017 +0300 comctl32/updown: Reset control width conditionally on UDM_SETBUDDY with NULL buddy handle. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/updown.c | 77 +++++++++++++++++++++++++++++++++++++++++++- dlls/comctl32/updown.c | 11 ++++--- 2 files changed, 82 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 1c21873..639e780 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -522,6 +522,7 @@ static void test_updown_pos32(void) static void test_updown_buddy(void) { HWND updown, buddyReturn, buddy; + RECT rect, rect2; WNDPROC proc; DWORD style; @@ -568,8 +569,82 @@ static void test_updown_buddy(void) } DestroyWindow(updown); - DestroyWindow(buddy); + + /* Create with buddy and UDS_HORZ, reset buddy. */ + updown = create_updown_control(UDS_HORZ, g_edit); + + buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0); + ok(buddyReturn == g_edit, "Unexpected buddy window.\n"); + + GetClientRect(updown, &rect); + + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0); + ok(buddyReturn == g_edit, "Unexpected buddy window.\n"); + + GetClientRect(updown, &rect2); + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + /* Remove UDS_HORZ, reset buddy again. */ + style = GetWindowLongA(updown, GWL_STYLE); + SetWindowLongA(updown, GWL_STYLE, style & ~UDS_HORZ); + style = GetWindowLongA(updown, GWL_STYLE); + ok(!(style & UDS_HORZ), "Unexpected style.\n"); + + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0); + ok(buddyReturn == NULL, "Unexpected buddy window.\n"); + + GetClientRect(updown, &rect2); + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + DestroyWindow(updown); + + /* Without UDS_HORZ. */ + updown = create_updown_control(0, g_edit); + + buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0); + ok(buddyReturn == g_edit, "Unexpected buddy window.\n"); + + GetClientRect(updown, &rect); + + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0); + ok(buddyReturn == g_edit, "Unexpected buddy window.\n"); + + GetClientRect(updown, &rect2); + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + DestroyWindow(updown); + + /* Create without buddy. */ + GetClientRect(parent_wnd, &rect); + updown = CreateWindowExA(0, UPDOWN_CLASSA, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE | UDS_HORZ, + 0, 0, rect.right, rect.bottom, parent_wnd, (HMENU)1, GetModuleHandleA(NULL), NULL); + ok(updown != NULL, "Failed to create UpDown control.\n"); + + GetClientRect(updown, &rect); + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0); + ok(buddyReturn == NULL, "Unexpected buddy window.\n"); + GetClientRect(updown, &rect2); + + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + style = GetWindowLongA(updown, GWL_STYLE); + SetWindowLongA(updown, GWL_STYLE, style & ~UDS_HORZ); + + GetClientRect(updown, &rect2); + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0); + ok(buddyReturn == NULL, "Unexpected buddy window.\n"); + GetClientRect(updown, &rect); + + buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0); + ok(buddyReturn == g_edit, "Unexpected buddy window.\n"); + GetClientRect(updown, &rect2); +todo_wine + ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n"); + + DestroyWindow(updown); } static void test_updown_base(void) diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index d188408..4f44b90 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -622,11 +622,11 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) RECT budRect; /* new coord for the buddy */ int x, width; /* new x position and width for the up-down */ WCHAR buddyClass[40]; - HWND ret; + HWND old_buddy; TRACE("(hwnd=%p, bud=%p)\n", infoPtr->Self, bud); - ret = infoPtr->Buddy; + old_buddy = infoPtr->Buddy; /* there is already a buddy assigned */ if (infoPtr->Buddy) RemoveWindowSubclass(infoPtr->Buddy, UPDOWN_Buddy_SubclassProc, @@ -663,7 +663,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) x = budRect.right+DEFAULT_XSEP; } else { /* nothing to do */ - return ret; + return old_buddy; } /* first adjust the buddy to accommodate the up/down */ @@ -692,14 +692,15 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) budRect.top - DEFAULT_ADDTOP, width, budRect.bottom - budRect.top + DEFAULT_ADDTOP + DEFAULT_ADDBOT, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOZORDER); - } else { + } else if (!(infoPtr->dwStyle & UDS_HORZ) && old_buddy != NULL) { RECT rect; GetWindowRect(infoPtr->Self, &rect); MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->Self), (POINT *)&rect, 2); SetWindowPos(infoPtr->Self, 0, rect.left, rect.top, DEFAULT_WIDTH, rect.bottom - rect.top, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOZORDER); } - return ret; + + return old_buddy; } /***********************************************************************
1
0
0
0
Nikolay Sivov : comctl32/tests: Add separate test for CreateUpDownControl( ).
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: 2d7aa093234bed47b1a21c64f93722be3684bb13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d7aa093234bed47b1a21c64…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 21 12:14:44 2017 +0300 comctl32/tests: Add separate test for CreateUpDownControl(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/updown.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index d6dbde0..1c21873 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -800,6 +800,29 @@ static void test_UDS_SETBUDDYINT(void) DestroyWindow(updown); } +static void test_CreateUpDownControl(void) +{ + HWND updown, buddy; + DWORD range, pos; + RECT rect; + + GetClientRect(parent_wnd, &rect); + updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE, + 0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), g_edit, 100, 10, 50); + ok(updown != NULL, "Failed to create control.\n"); + + buddy = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0); + ok(buddy == g_edit, "Unexpected buddy window.\n"); + + range = SendMessageA(updown, UDM_GETRANGE, 0, 0); + ok(range == MAKELONG(100, 10), "Unexpected range.\n"); + + pos = SendMessageA(updown, UDM_GETPOS, 0, 0); + ok(pos == MAKELONG(50, 1), "Unexpected position.\n"); + + DestroyWindow(updown); +} + START_TEST(updown) { HMODULE mod = GetModuleHandleA("comctl32.dll"); @@ -821,6 +844,7 @@ START_TEST(updown) test_updown_base(); test_updown_unicode(); test_UDS_SETBUDDYINT(); + test_CreateUpDownControl(); DestroyWindow(g_edit); DestroyWindow(parent_wnd);
1
0
0
0
Nikolay Sivov : comctl32/tests: Use CreateWindowEx() to create UpDown controls.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: 9e66be57b040b4c12aeb6220382b281d855bbd55 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9e66be57b040b4c12aeb6220…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 21 12:14:43 2017 +0300 comctl32/tests: Use CreateWindowEx() to create UpDown controls. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/updown.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 3076285..d6dbde0 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -293,11 +293,16 @@ static HWND create_updown_control(DWORD style, HWND buddy) RECT rect; GetClientRect(parent_wnd, &rect); - updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | style, - 0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), buddy, - 100, 0, 50); + updown = CreateWindowExA(0, UPDOWN_CLASSA, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE | style, + 0, 0, rect.right, rect.bottom, + parent_wnd, (HMENU)1, GetModuleHandleA(NULL), NULL); + ok(updown != NULL, "Failed to create UpDown control.\n"); if (!updown) return NULL; + SendMessageA(updown, UDM_SETBUDDY, (WPARAM)buddy, 0); + SendMessageA(updown, UDM_SETRANGE, 0, MAKELONG(100, 0)); + SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(50, 0)); + oldproc = (WNDPROC)SetWindowLongPtrA(updown, GWLP_WNDPROC, (LONG_PTR)updown_subclass_proc); SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc);
1
0
0
0
Zebediah Figura : user32/tests: Add a basic test for maximizing windows.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: d95be60ff65b96b82576b5bc0ead5fb6c6729cd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d95be60ff65b96b82576b5bc…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 21 01:21:02 2017 -0600 user32/tests: Add a basic test for maximizing windows. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 6268042..f9472ec 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6528,8 +6528,9 @@ static void test_ShowWindow(void) { HWND hwnd; DWORD style; - RECT rcMain, rc, rcMinimized, rcClient, rcEmpty; + RECT rcMain, rc, rcMinimized, rcClient, rcEmpty, rcMaximized, rcResized; LPARAM ret; + MONITORINFO mon_info; SetRect(&rcClient, 0, 0, 90, 90); rcMain = rcClient; @@ -6547,6 +6548,12 @@ static void test_ShowWindow(void) 0, 0, 0, NULL); assert(hwnd); + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW(MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY), &mon_info); + rcMaximized = mon_info.rcWork; + AdjustWindowRectEx(&rcMaximized, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_BORDER, + 0, GetWindowLongA(hwnd, GWL_EXSTYLE)); + style = GetWindowLongA(hwnd, GWL_STYLE); ok(!(style & WS_DISABLED), "window should not be disabled\n"); ok(!(style & WS_VISIBLE), "window should not be visible\n"); @@ -6617,6 +6624,35 @@ static void test_ShowWindow(void) ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); + ShowWindow(hwnd, SW_MAXIMIZE); + ok(ret, "not expected ret: %lu\n", ret); + style = GetWindowLongA(hwnd, GWL_STYLE); + ok(!(style & WS_DISABLED), "window should not be disabled\n"); + ok(style & WS_VISIBLE, "window should be visible\n"); + ok(!(style & WS_MINIMIZE), "window should be minimized\n"); + ok(style & WS_MAXIMIZE, "window should not be maximized\n"); + GetWindowRect(hwnd, &rc); + ok(EqualRect(&rcMaximized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMaximized), wine_dbgstr_rect(&rc)); + /* maximized windows can be resized */ + ret = SetWindowPos(hwnd, 0, 300, 300, 200, 200, SWP_NOACTIVATE | SWP_NOZORDER); + ok(ret, "not expected ret: %lu\n", ret); + SetRect(&rcResized, 300, 300, 500, 500); + GetWindowRect(hwnd, &rc); + ok(EqualRect(&rcResized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcResized), wine_dbgstr_rect(&rc)); + + ShowWindow(hwnd, SW_RESTORE); + ok(ret, "not expected ret: %lu\n", ret); + style = GetWindowLongA(hwnd, GWL_STYLE); + ok(!(style & WS_DISABLED), "window should not be disabled\n"); + ok(style & WS_VISIBLE, "window should be visible\n"); + ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); + ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); + GetWindowRect(hwnd, &rc); + ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), + wine_dbgstr_rect(&rc)); + ret = EnableWindow(hwnd, FALSE); ok(!ret, "not expected ret: %lu\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE);
1
0
0
0
Zebediah Figura : user32/tests: Also test client rect size.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: b7cdfd312cd407d3f83cbf5076eb2bfe88261b1e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7cdfd312cd407d3f83cbf50…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 21 01:21:01 2017 -0600 user32/tests: Also test client rect size. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index c0d83ef..6268042 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6528,12 +6528,16 @@ static void test_ShowWindow(void) { HWND hwnd; DWORD style; - RECT rcMain, rc, rcMinimized; + RECT rcMain, rc, rcMinimized, rcClient, rcEmpty; LPARAM ret; - SetRect(&rcMain, 120, 120, 210, 210); + SetRect(&rcClient, 0, 0, 90, 90); + rcMain = rcClient; + OffsetRect(&rcMain, 120, 120); + AdjustWindowRect(&rcMain, WS_CAPTION, 0); SetRect(&rcMinimized, -32000, -32000, -32000 + GetSystemMetrics(SM_CXMINIMIZED), -32000 + GetSystemMetrics(SM_CYMINIMIZED)); + SetRectEmpty(&rcEmpty); hwnd = CreateWindowExA(0, "MainWindowClass", NULL, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | @@ -6551,6 +6555,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = ShowWindow(hwnd, SW_SHOW); ok(!ret, "not expected ret: %lu\n", ret); @@ -6562,6 +6569,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = ShowWindow(hwnd, SW_MINIMIZE); ok(ret, "not expected ret: %lu\n", ret); @@ -6574,6 +6584,10 @@ static void test_ShowWindow(void) 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)); /* shouldn't be able to resize minimized windows */ ret = SetWindowPos(hwnd, 0, 0, 0, (rcMinimized.right - rcMinimized.left) * 2, @@ -6584,6 +6598,10 @@ static void test_ShowWindow(void) 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)); ShowWindow(hwnd, SW_RESTORE); ok(ret, "not expected ret: %lu\n", ret); @@ -6595,6 +6613,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = EnableWindow(hwnd, FALSE); ok(!ret, "not expected ret: %lu\n", ret); @@ -6611,6 +6632,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); ok(!ret, "not expected ret: %lu\n", ret); @@ -6622,6 +6646,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = ShowWindow(hwnd, SW_MINIMIZE); ok(ret, "not expected ret: %lu\n", ret); @@ -6634,6 +6661,10 @@ static void test_ShowWindow(void) 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)); ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); ok(!ret, "not expected ret: %lu\n", ret); @@ -6646,6 +6677,10 @@ static void test_ShowWindow(void) 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)); ret = ShowWindow(hwnd, SW_RESTORE); ok(ret, "not expected ret: %lu\n", ret); @@ -6657,6 +6692,9 @@ static void test_ShowWindow(void) GetWindowRect(hwnd, &rc); ok(EqualRect(&rcMain, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rcMain), wine_dbgstr_rect(&rc)); + GetClientRect(hwnd, &rc); + ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc)); ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); ok(!ret, "not expected ret: %lu\n", ret); @@ -6682,6 +6720,10 @@ static void test_ShowWindow(void) 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)); DestroyWindow(hwnd); hwnd = CreateWindowExA(0, "MainWindowClass", NULL, @@ -6697,6 +6739,10 @@ static void test_ShowWindow(void) 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)); DestroyWindow(hwnd); }
1
0
0
0
Zebediah Figura : user32/tests: Explicitly test minimized window size.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: wine Branch: master Commit: 54388647afee51639788321e5342c2432372c261 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54388647afee51639788321e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Dec 21 01:21:00 2017 -0600 user32/tests: Explicitly test minimized window size. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index fc35542..c0d83ef 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6532,6 +6532,8 @@ static void test_ShowWindow(void) LPARAM ret; SetRect(&rcMain, 120, 120, 210, 210); + SetRect(&rcMinimized, -32000, -32000, -32000 + GetSystemMetrics(SM_CXMINIMIZED), + -32000 + GetSystemMetrics(SM_CYMINIMIZED)); hwnd = CreateWindowExA(0, "MainWindowClass", NULL, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | @@ -6568,8 +6570,10 @@ static void test_ShowWindow(void) ok(style & WS_VISIBLE, "window should be visible\n"); ok(style & WS_MINIMIZE, "window should be minimized\n"); ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rcMinimized); - ok(!EqualRect(&rcMain, &rcMinimized), "rects shouldn't match\n"); + GetWindowRect(hwnd, &rc); + todo_wine + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); /* shouldn't be able to resize minimized windows */ ret = SetWindowPos(hwnd, 0, 0, 0, (rcMinimized.right - rcMinimized.left) * 2, @@ -6577,7 +6581,9 @@ static void test_ShowWindow(void) SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); ok(ret, "not expected ret: %lu\n", ret); GetWindowRect(hwnd, &rc); - ok(EqualRect(&rc, &rcMinimized), "rects should match\n"); + todo_wine + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); ShowWindow(hwnd, SW_RESTORE); ok(ret, "not expected ret: %lu\n", ret); @@ -6625,7 +6631,9 @@ 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); - ok(!EqualRect(&rcMain, &rc), "rects shouldn't match\n"); + todo_wine + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); ok(!ret, "not expected ret: %lu\n", ret); @@ -6635,7 +6643,9 @@ 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); - ok(!EqualRect(&rcMain, &rc), "rects shouldn't match\n"); + todo_wine + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); ret = ShowWindow(hwnd, SW_RESTORE); ok(ret, "not expected ret: %lu\n", ret); @@ -6670,9 +6680,8 @@ static void test_ShowWindow(void) ok(style & WS_MINIMIZE, "window should be minimized\n"); GetWindowRect(hwnd, &rc); todo_wine - ok((rc.left == -32000 || rc.left == 3000) && - (rc.top == -32000 || rc.top == 3000), - "expected (-32000,-32000), got (%d,%d)\n", rc.left, rc.top); + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); DestroyWindow(hwnd); hwnd = CreateWindowExA(0, "MainWindowClass", NULL, @@ -6685,9 +6694,9 @@ static void test_ShowWindow(void) style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_MINIMIZE, "window should be minimized\n"); GetWindowRect(hwnd, &rc); - ok((rc.left == -32000 || rc.left == 3000) && - (rc.top == -32000 || rc.top == 3000), - "expected (-32000,-32000), got (%d,%d)\n", rc.left, rc.top); + todo_wine + ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n", + wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc)); DestroyWindow(hwnd); }
1
0
0
0
Francois Gouget : testbot/web: Use a white background for Collection tables.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: tools Branch: master Commit: 7b6416561e76742fbe7ee6b98cc97eafdca893c8 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=7b6416561e76742fbe7ee6b9…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Dec 21 12:19:08 2017 +0100 testbot/web: Use a white background for Collection tables. This makes the table more readable when it is wide and goes off the edge of the page. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/WineTestBot.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css index bb80e7f..8c03a91 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -221,6 +221,7 @@ h2 margin-right: auto; padding: 4px; border: 1px solid #601919; + background-color: white; } .CollectionBlock th @@ -347,7 +348,7 @@ td.Record { text-align: center; } .RecordJob { font-size: smaller; } .RecordDuration { } -.Record-start { background-color: white; } +.Record-start { } .Record-off { color: #c0c0c0; } .Record-unknown { background-color: #c0c0c0; } .Record-offline { background-color: red; }
1
0
0
0
Francois Gouget : testbot: Avoid reference cycles between Collections.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: tools Branch: master Commit: 86aeeb298b68529e98c8bc44ae33d0db27898fbf URL:
http://source.winehq.org/git/tools.git/?a=commit;h=86aeeb298b68529e98c8bc44…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Dec 21 12:14:21 2017 +0100 testbot: Avoid reference cycles between Collections. Specifically when the Collection is used for a Detailref property (e.g. Jobs->Steps), it should not keep a reference to the parent's ScopeItems. Reference cycles cause Perl's primitive reference-count based garbage collector to leak memory. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/ObjectModel/Collection.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm index c3bc438..a9ec995 100644 --- a/testbot/lib/ObjectModel/Collection.pm +++ b/testbot/lib/ObjectModel/Collection.pm @@ -43,6 +43,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(&new &ComputeMasterKey); +use Scalar::Util qw(weaken); use ObjectModel::BackEnd; use ObjectModel::Item; use ObjectModel::PropertyDescriptor; @@ -96,6 +97,14 @@ sub new($$$$$;$$@) Filters => {}, AllScopeItems => $AllScopeItems || {}, Items => undef}; + if ($AllScopeItems) + { + # Avoid memory cycles in case Items have Detailref properties: + # ParentCollection{AllScopeItems} --> ParentItem + # ParentItem --DetailrefProperty--> DetailCollection + # DetailCollection{AllScopeItems} == ParentCollection{AllScopeItems} + weaken($self->{AllScopeItems}); + } $self = bless $self, $class; $self->_initialize(@_); return $self;
1
0
0
0
Francois Gouget : testbot: Avoid reference cycles between Items and their Collection.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: tools Branch: master Commit: 0de6856d608d6d44ab36f0b16248c8998e9455b7 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=0de6856d608d6d44ab36f0b1…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Dec 21 12:13:59 2017 +0100 testbot: Avoid reference cycles between Items and their Collection. Reference cycles cause Perl's primitive reference-count based garbage collector to leak memory. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/ObjectModel/Item.pm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/testbot/lib/ObjectModel/Item.pm b/testbot/lib/ObjectModel/Item.pm index c27e40c..88c9d1a 100644 --- a/testbot/lib/ObjectModel/Item.pm +++ b/testbot/lib/ObjectModel/Item.pm @@ -26,6 +26,7 @@ ObjectModel::Item - Base class for items =cut +use Scalar::Util qw(weaken); use ObjectModel::BackEnd; use ObjectModel::Collection; use ObjectModel::PropertyDescriptor; @@ -68,6 +69,9 @@ sub new($$@) $self->{TableName} = $Collection->{TableName}; $self->{ScopeItems} = $Collection->{AllScopeItems}->{ref($Collection)}; $self->{AllScopeItems} = $Collection->{AllScopeItems}; + # Avoid memory cycles + weaken($self->{ScopeItems}); + weaken($self->{AllScopeItems}); $self->{PropertyDescriptors} = $Collection->{PropertyDescriptors}; $self->{MasterColNames} = $Collection->{MasterColNames}; $self->{MasterColValues} = $Collection->{MasterColValues}; @@ -509,14 +513,21 @@ sub MasterKeyChanged($$) { my ($self, $MasterColValues) = @_; - my $Key = $self->GetKey(); - my $FullKey = $self->GetFullKey($Key); - delete($self->{ScopeItems}->{$FullKey}) if (defined $FullKey); + my $Key; + if ($self->{ScopeItems}) + { + $Key = $self->GetKey(); + my $FullKey = $self->GetFullKey($Key); + delete($self->{ScopeItems}->{$FullKey}) if (defined $FullKey); + } $self->{MasterColValues} = $MasterColValues; $self->{MasterKey} = ObjectModel::Collection::ComputeMasterKey($MasterColValues); - $FullKey = $self->GetFullKey($Key); - $self->{ScopeItems}->{$FullKey} = $self if (defined $FullKey); + if ($self->{ScopeItems}) + { + my $FullKey = $self->GetFullKey($Key); + $self->{ScopeItems}->{$FullKey} = $self if (defined $FullKey); + } $self->KeyChanged(); }
1
0
0
0
Francois Gouget : testbot: Avoid reference cycles in the activity report.
by Alexandre Julliard
21 Dec '17
21 Dec '17
Module: tools Branch: master Commit: 24091deb5078660f608d7ad7568664574fc0dcfa URL:
http://source.winehq.org/git/tools.git/?a=commit;h=24091deb5078660f608d7ad7…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Dec 21 12:13:43 2017 +0100 testbot: Avoid reference cycles in the activity report. Reference cycles cause Perl's primitive reference-count based garbage collector to leak memory. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/Activity.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm index 3a9081a..dcc5895 100644 --- a/testbot/lib/WineTestBot/Activity.pm +++ b/testbot/lib/WineTestBot/Activity.pm @@ -25,6 +25,7 @@ WineTestBot::Activity - reconstruct the TestBot's activity from its history rec =cut +use Scalar::Util qw(weaken); use WineTestBot::Config; use WineTestBot::Jobs; use WineTestBot::RecordGroups; @@ -112,6 +113,7 @@ sub GetActivity($) $VMStatus->{host} = $RecordHost; $VMStatus->{vmstatus} = $VMStatus; + weaken($VMStatus->{vmstatus}); # avoid memory cycles $VMStatus->{start} = $Group->{start}; my ($Status, @Extra) = split / /, $Record->Value; $VMStatus->{status} = $Status; @@ -176,6 +178,7 @@ sub GetActivity($) status => "unknown", rows => 1}; $VMStatus->{vmstatus} = $VMStatus; + weaken($VMStatus->{vmstatus}); # avoid memory cycles } $LastStatusVMs{$VM->Name} = $StatusVMs; }
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
45
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Results per page:
10
25
50
100
200