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
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
September 2021
----- 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
1030 discussions
Start a n
N
ew thread
Zhiyi Zhang : uxtheme/tests: Add EnableTheming() tests.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: 2cfd5c0850df48b1c5ab3a27166d1a6d533f61ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2cfd5c0850df48b1c5ab3a27…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Sep 22 10:23:49 2021 +0800 uxtheme/tests: Add EnableTheming() tests. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/tests/Makefile.in | 2 +- dlls/uxtheme/tests/system.c | 173 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/tests/Makefile.in b/dlls/uxtheme/tests/Makefile.in index 42bdcfaa365..3fd3c23f5d8 100644 --- a/dlls/uxtheme/tests/Makefile.in +++ b/dlls/uxtheme/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = uxtheme.dll -IMPORTS = user32 gdi32 uxtheme +IMPORTS = advapi32 user32 gdi32 uxtheme C_SRCS = \ system.c diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index b088a7a050e..a4ace2adfd3 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -1099,6 +1099,176 @@ done: pSetThreadDpiAwarenessContext(old_context); } +static void test_EnableTheming(void) +{ + WCHAR old_color_string[13], new_color_string[13], color_string[13]; + BOOL old_gradient_caption, new_gradient_caption, gradient_caption; + BOOL old_flat_menu, new_flat_menu, flat_menu; + LOGFONTW old_logfont, new_logfont, logfont; + NONCLIENTMETRICSW old_ncm, new_ncm, ncm; + DPI_AWARENESS_CONTEXT old_context = 0; + COLORREF old_color, new_color; + BOOL is_theme_active, ret; + DWORD size, length; + HRESULT hr; + LSTATUS ls; + HKEY hkey; + + if (IsThemeActive()) + { + hr = EnableTheming(TRUE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(IsThemeActive(), "Expected theming active.\n"); + + /* Only run in interactive mode because once theming is disabled, it can't be turned back on + * via EnableTheming() */ + if (winetest_interactive) + { + if (pSetThreadDpiAwarenessContext) + { + old_context = pSetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE); + } + else if (get_primary_monitor_effective_dpi() != 96) + { + skip("DPI isn't 96, skipping.\n"); + return; + } + + /* Read current system metrics */ + old_color = GetSysColor(COLOR_SCROLLBAR); + swprintf(old_color_string, ARRAY_SIZE(old_color_string), L"%d %d %d", + GetRValue(old_color), GetGValue(old_color), GetBValue(old_color)); + + memset(&old_ncm, 0, sizeof(old_ncm)); + old_ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSW, iPaddedBorderWidth); + ret = SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(old_ncm), &old_ncm, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + + memset(&old_logfont, 0, sizeof(old_logfont)); + ret = SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(old_logfont), &old_logfont, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_GETFLATMENU, 0, &old_flat_menu, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_GETGRADIENTCAPTIONS, 0, &old_gradient_caption, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + + /* Write new system metrics to the registry */ + new_color = ~old_color; + new_flat_menu = !old_flat_menu; + new_gradient_caption = !old_gradient_caption; + memcpy(&new_ncm, &old_ncm, sizeof(new_ncm)); + new_ncm.iScrollWidth += 5; + memcpy(&new_logfont, &old_logfont, sizeof(new_logfont)); + new_logfont.lfWidth += 5; + + ls = RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\\Colors", 0, KEY_ALL_ACCESS, + &hkey); + ok(!ls, "RegOpenKeyExW failed, ls %#x.\n", ls); + + length = swprintf(new_color_string, ARRAY_SIZE(new_color_string), L"%d %d %d", + GetRValue(new_color), GetGValue(new_color), GetBValue(new_color)); + ls = RegSetValueExW(hkey, L"Scrollbar", 0, REG_SZ, (BYTE *)new_color_string, + (length + 1) * sizeof(WCHAR)); + ok(!ls, "RegSetValueExW failed, ls %#x.\n", ls); + + ret = SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(new_ncm), &new_ncm, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETICONTITLELOGFONT, sizeof(new_logfont), &new_logfont, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETFLATMENU, 0, (void *)(INT_PTR)new_flat_menu, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETGRADIENTCAPTIONS, 0, + (void *)(INT_PTR)new_gradient_caption, SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + + /* Change theming state */ + hr = EnableTheming(FALSE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + is_theme_active = IsThemeActive(); + ok(!is_theme_active || broken(is_theme_active), /* Win8+ can no longer disable theming */ + "Expected theming inactive.\n"); + + /* Test that system metrics are unchanged */ + size = sizeof(color_string); + ls = RegQueryValueExW(hkey, L"Scrollbar", NULL, NULL, (BYTE *)color_string, &size); + ok(!ls, "RegQueryValueExW failed, ls %#x.\n", ls); + todo_wine + ok(!lstrcmpW(color_string, new_color_string), "Expected %s, got %s.\n", + wine_dbgstr_w(new_color_string), wine_dbgstr_w(color_string)); + + ret = SystemParametersInfoW(SPI_GETFLATMENU, 0, &flat_menu, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ok(flat_menu == new_flat_menu, "Expected %d, got %d.\n", new_flat_menu, flat_menu); + ret = SystemParametersInfoW(SPI_GETGRADIENTCAPTIONS, 0, &gradient_caption, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + todo_wine + ok(gradient_caption == new_gradient_caption, "Expected %d, got %d.\n", + new_gradient_caption, gradient_caption); + + memset(&ncm, 0, sizeof(ncm)); + ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSW, iPaddedBorderWidth); + ret = SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + todo_wine + ok(!memcmp(&ncm, &new_ncm, sizeof(ncm)), "Expected non-client metrics unchanged.\n"); + + memset(&logfont, 0, sizeof(logfont)); + ret = SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(logfont), &logfont, 0); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + todo_wine + ok(!memcmp(&logfont, &new_logfont, sizeof(logfont)), + "Expected icon title font unchanged.\n"); + + /* Test that theming cannot be turned on via EnableTheming() */ + hr = EnableTheming(TRUE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + is_theme_active = IsThemeActive(); + todo_wine + ok(!is_theme_active || broken(is_theme_active), /* Win8+ can no longer disable theming */ + "Expected theming inactive.\n"); + + /* Restore system metrics */ + ls = RegSetValueExW(hkey, L"Scrollbar", 0, REG_SZ, (BYTE *)old_color_string, + (lstrlenW(old_color_string) + 1) * sizeof(WCHAR)); + ok(!ls, "RegSetValueExW failed, ls %#x.\n", ls); + ret = SystemParametersInfoW(SPI_SETFLATMENU, 0, (void *)(INT_PTR)old_flat_menu, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETGRADIENTCAPTIONS, 0, + (void *)(INT_PTR)old_gradient_caption, SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(old_ncm), &old_ncm, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + ret = SystemParametersInfoW(SPI_SETICONTITLELOGFONT, sizeof(old_logfont), &old_logfont, + SPIF_UPDATEINIFILE); + ok(ret, "SystemParametersInfoW failed, error %u.\n", GetLastError()); + + RegCloseKey(hkey); + if (pSetThreadDpiAwarenessContext) + pSetThreadDpiAwarenessContext(old_context); + } + } + else + { + hr = EnableTheming(FALSE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(!IsThemeActive(), "Expected theming inactive.\n"); + + hr = EnableTheming(TRUE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + todo_wine + ok(!IsThemeActive(), "Expected theming inactive.\n"); + + hr = EnableTheming(FALSE); + ok(hr == S_OK, "EnableTheming failed, hr %#x.\n", hr); + ok(!IsThemeActive(), "Expected theming inactive.\n"); + } +} + START_TEST(system) { init_funcs(); @@ -1118,4 +1288,7 @@ START_TEST(system) test_GetThemePartSize(); test_CloseThemeData(); test_buffered_paint(); + + /* Test EnableTheming() in the end because it may disable theming */ + test_EnableTheming(); }
1
0
0
0
Zhiyi Zhang : uxtheme: Initialize system metrics in 96 DPI.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: cd99d08a74736f9267c53c63e7a5399ea133147b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd99d08a74736f9267c53c63…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Sep 22 10:23:38 2021 +0800 uxtheme: Initialize system metrics in 96 DPI. Similar to 7290db3. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/msstyles.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index 7356f6ea354..f129d998d65 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -733,12 +733,18 @@ struct PARSENONCLIENTSTATE static inline void parse_init_nonclient (struct PARSENONCLIENTSTATE* state) { + DPI_AWARENESS_CONTEXT old_context; + + old_context = SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE); + memset (state, 0, sizeof (*state)); state->metrics.cbSize = sizeof (NONCLIENTMETRICSW); SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW), &state->metrics, 0); SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (LOGFONTW), &state->iconTitleFont, 0); + + SetThreadDpiAwarenessContext(old_context); } static BOOL parse_handle_nonclient_font (struct PARSENONCLIENTSTATE* state,
1
0
0
0
Zhiyi Zhang : uxtheme: Use wide character string literals.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: af48d90a6fa7eb76559261d68c9d8fae7421c617 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af48d90a6fa7eb76559261d6…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Sep 22 10:22:33 2021 +0800 uxtheme: Use wide character string literals. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 87 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index a467fc8b157..8ced977c267 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -199,39 +199,39 @@ static void UXTHEME_LoadTheme(void) /***********************************************************************/ -static const char * const SysColorsNames[] = +static const WCHAR * const SysColorsNames[] = { - "Scrollbar", /* COLOR_SCROLLBAR */ - "Background", /* COLOR_BACKGROUND */ - "ActiveTitle", /* COLOR_ACTIVECAPTION */ - "InactiveTitle", /* COLOR_INACTIVECAPTION */ - "Menu", /* COLOR_MENU */ - "Window", /* COLOR_WINDOW */ - "WindowFrame", /* COLOR_WINDOWFRAME */ - "MenuText", /* COLOR_MENUTEXT */ - "WindowText", /* COLOR_WINDOWTEXT */ - "TitleText", /* COLOR_CAPTIONTEXT */ - "ActiveBorder", /* COLOR_ACTIVEBORDER */ - "InactiveBorder", /* COLOR_INACTIVEBORDER */ - "AppWorkSpace", /* COLOR_APPWORKSPACE */ - "Hilight", /* COLOR_HIGHLIGHT */ - "HilightText", /* COLOR_HIGHLIGHTTEXT */ - "ButtonFace", /* COLOR_BTNFACE */ - "ButtonShadow", /* COLOR_BTNSHADOW */ - "GrayText", /* COLOR_GRAYTEXT */ - "ButtonText", /* COLOR_BTNTEXT */ - "InactiveTitleText", /* COLOR_INACTIVECAPTIONTEXT */ - "ButtonHilight", /* COLOR_BTNHIGHLIGHT */ - "ButtonDkShadow", /* COLOR_3DDKSHADOW */ - "ButtonLight", /* COLOR_3DLIGHT */ - "InfoText", /* COLOR_INFOTEXT */ - "InfoWindow", /* COLOR_INFOBK */ - "ButtonAlternateFace", /* COLOR_ALTERNATEBTNFACE */ - "HotTrackingColor", /* COLOR_HOTLIGHT */ - "GradientActiveTitle", /* COLOR_GRADIENTACTIVECAPTION */ - "GradientInactiveTitle", /* COLOR_GRADIENTINACTIVECAPTION */ - "MenuHilight", /* COLOR_MENUHILIGHT */ - "MenuBar", /* COLOR_MENUBAR */ + L"Scrollbar", /* COLOR_SCROLLBAR */ + L"Background", /* COLOR_BACKGROUND */ + L"ActiveTitle", /* COLOR_ACTIVECAPTION */ + L"InactiveTitle", /* COLOR_INACTIVECAPTION */ + L"Menu", /* COLOR_MENU */ + L"Window", /* COLOR_WINDOW */ + L"WindowFrame", /* COLOR_WINDOWFRAME */ + L"MenuText", /* COLOR_MENUTEXT */ + L"WindowText", /* COLOR_WINDOWTEXT */ + L"TitleText", /* COLOR_CAPTIONTEXT */ + L"ActiveBorder", /* COLOR_ACTIVEBORDER */ + L"InactiveBorder", /* COLOR_INACTIVEBORDER */ + L"AppWorkSpace", /* COLOR_APPWORKSPACE */ + L"Hilight", /* COLOR_HIGHLIGHT */ + L"HilightText", /* COLOR_HIGHLIGHTTEXT */ + L"ButtonFace", /* COLOR_BTNFACE */ + L"ButtonShadow", /* COLOR_BTNSHADOW */ + L"GrayText", /* COLOR_GRAYTEXT */ + L"ButtonText", /* COLOR_BTNTEXT */ + L"InactiveTitleText", /* COLOR_INACTIVECAPTIONTEXT */ + L"ButtonHilight", /* COLOR_BTNHIGHLIGHT */ + L"ButtonDkShadow", /* COLOR_3DDKSHADOW */ + L"ButtonLight", /* COLOR_3DLIGHT */ + L"InfoText", /* COLOR_INFOTEXT */ + L"InfoWindow", /* COLOR_INFOBK */ + L"ButtonAlternateFace", /* COLOR_ALTERNATEBTNFACE */ + L"HotTrackingColor", /* COLOR_HOTLIGHT */ + L"GradientActiveTitle", /* COLOR_GRADIENTACTIVECAPTION */ + L"GradientInactiveTitle", /* COLOR_GRADIENTINACTIVECAPTION */ + L"MenuHilight", /* COLOR_MENUHILIGHT */ + L"MenuBar", /* COLOR_MENUBAR */ }; static const WCHAR strColorKey[] = L"Control Panel\\Colors"; @@ -251,9 +251,9 @@ static const struct BackupSysParam static void save_sys_colors (HKEY baseKey) { - char colorStr[13]; + WCHAR colorStr[13]; HKEY hKey; - int i; + int i, length; if (RegCreateKeyExW( baseKey, strColorKey, 0, 0, 0, KEY_ALL_ACCESS, @@ -262,12 +262,11 @@ static void save_sys_colors (HKEY baseKey) for (i = 0; i < NUM_SYS_COLORS; i++) { COLORREF col = GetSysColor (i); - - sprintf (colorStr, "%d %d %d", - GetRValue (col), GetGValue (col), GetBValue (col)); - RegSetValueExA (hKey, SysColorsNames[i], 0, REG_SZ, - (BYTE*)colorStr, strlen (colorStr)+1); + length = swprintf(colorStr, ARRAY_SIZE(colorStr), L"%d %d %d", GetRValue(col), + GetGValue(col), GetBValue(col)); + RegSetValueExW(hKey, SysColorsNames[i], 0, REG_SZ, (BYTE *)colorStr, + (length + 1) * sizeof(WCHAR)); } RegCloseKey (hKey); } @@ -350,14 +349,14 @@ static void UXTHEME_RestoreSystemMetrics(void) for (i = 0; i < NUM_SYS_COLORS; i++) { DWORD type; - char colorStr[13]; + WCHAR colorStr[13]; DWORD count = sizeof(colorStr); - - if (RegQueryValueExA (colorKey, SysColorsNames[i], 0, - &type, (LPBYTE) colorStr, &count) == ERROR_SUCCESS) + + if (RegQueryValueExW(colorKey, SysColorsNames[i], 0, &type, (LPBYTE)colorStr, + &count) == ERROR_SUCCESS) { int r, g, b; - if (sscanf (colorStr, "%d %d %d", &r, &g, &b) == 3) + if (swscanf(colorStr, L"%d %d %d", &r, &g, &b) == 3) { sysColsIndices[sysColCount] = i; sysCols[sysColCount] = RGB(r, g, b);
1
0
0
0
Connor McAdams : user32/tests: Fix existing winevents in test_DestroyWindow() message sequences.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: a6227531867b8bc5c0c0b94f04443711d62d6baa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6227531867b8bc5c0c0b94f…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Sep 21 19:50:41 2021 -0400 user32/tests: Fix existing winevents in test_DestroyWindow() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 7b75b65193b..ba5ef5f4c82 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11485,16 +11485,16 @@ static void test_scrollwindowex(void) } static const struct message destroy_window_with_children[] = { - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, /* popup */ + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, /* popup */ { HCBT_DESTROYWND, hook|lparam, 0, WND_PARENT_ID }, /* parent */ { 0x0090, sent|optional }, { HCBT_DESTROYWND, hook|lparam, 0, WND_POPUP_ID }, /* popup */ { 0x0090, sent|optional }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, /* popup */ + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, /* popup */ { WM_DESTROY, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ { WM_CAPTURECHANGED, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ { WM_NCDESTROY, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, /* parent */ + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, /* parent */ { WM_DESTROY, sent|wparam|lparam, 0, WND_PARENT_ID }, /* parent */ { WM_DESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 2 }, /* child2 */ { WM_DESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 1 }, /* child1 */ @@ -18548,6 +18548,9 @@ START_TEST(msg) test_set_hook(); test_recursive_hook(); } + test_DestroyWindow(); + test_DispatchMessage(); + test_SendMessageTimeout(); /* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18558,9 +18561,6 @@ START_TEST(msg) } hEvent_hook = 0; - test_DestroyWindow(); - test_DispatchMessage(); - test_SendMessageTimeout(); test_edit_messages(); test_quit_message(); test_notify_message();
1
0
0
0
Connor McAdams : user32/tests: Add missing winevents to test_accelerators() message sequences.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: 18d2df2bdf5381c1b2529795805876fe791f81f3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18d2df2bdf5381c1b2529795…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Sep 21 19:50:40 2021 -0400 user32/tests: Add missing winevents to test_accelerators() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c79d8838a18..7b75b65193b 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9493,12 +9493,18 @@ static const struct message WmShiftF10Seq[] = { { WM_SYSCOMMAND, sent|defwinproc|wparam, SC_KEYMENU }, { HCBT_SYSCOMMAND, hook }, { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|defwinproc }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE), 0, MAKEWPARAM(0,MF_RIGHTJUSTIFY) }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xd0000001 }, /* XP */ { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 0x10000001 }, /* XP */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc|wparam|lparam, 0, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_EXITMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 0xc0000001 }, /* XP */ { WM_KEYUP, wparam|lparam, VK_ESCAPE, 0xc0000001 }, @@ -18533,6 +18539,15 @@ START_TEST(msg) test_paint_messages(); test_interthread_messages(); test_message_conversion(); + test_accelerators(); + test_timers(); + test_timers_no_wnd(); + test_timers_exceptions(); + if (hCBT_hook) + { + test_set_hook(); + test_recursive_hook(); + } /* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18543,15 +18558,6 @@ START_TEST(msg) } hEvent_hook = 0; - test_accelerators(); - test_timers(); - test_timers_no_wnd(); - test_timers_exceptions(); - if (hCBT_hook) - { - test_set_hook(); - test_recursive_hook(); - } test_DestroyWindow(); test_DispatchMessage(); test_SendMessageTimeout();
1
0
0
0
Connor McAdams : user32/tests: Fix existing winevents in test_accelerators() message sequences.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: 7c87284290a6a05f4f74f118ff3808695d976f3e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c87284290a6a05f4f74f118…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Sep 21 19:50:39 2021 -0400 user32/tests: Fix existing winevents in test_accelerators() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index a8cd85a791c..c79d8838a18 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9273,16 +9273,16 @@ static const struct message WmAltVkN[] = { { WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 'n' }, { HCBT_SYSCOMMAND, hook }, { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { 0x00AE, sent|defwinproc|optional }, /* XP */ { WM_GETTEXT, sent|defwinproc|optional }, /* XP */ { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_MENUCHAR, sent|defwinproc|wparam, MAKEWPARAM('n',MF_SYSMENU) }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc }, { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_EXITMENULOOP, sent|defwinproc }, { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, /* Win95 bug */ { WM_EXITMENULOOP, sent|defwinproc|optional }, /* Win95 bug */ @@ -9390,19 +9390,19 @@ static const struct message WmAltPressRelease[] = { { WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 0 }, { HCBT_SYSCOMMAND, hook }, { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE), 0, MAKEWPARAM(0,MF_RIGHTJUSTIFY) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x30000001 }, /* XP */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0, }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0, }, { WM_CAPTURECHANGED, sent|defwinproc }, { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_EXITMENULOOP, sent|defwinproc }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ { WM_SYSKEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, @@ -9459,20 +9459,20 @@ static const struct message WmVkF10Seq[] = { { WM_SYSCOMMAND, sent|defwinproc|wparam, SC_KEYMENU }, { HCBT_SYSCOMMAND, hook }, { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE), 0, MAKEWPARAM(0,MF_RIGHTJUSTIFY) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0x10000001 }, /* XP */ { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0, }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0, }, { WM_CAPTURECHANGED, sent|defwinproc }, { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_SYSMENU, 0 }, { WM_EXITMENULOOP, sent|defwinproc }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */ { WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 },
1
0
0
0
Connor McAdams : user32/tests: Fix test_paint_messages() message sequences to support WinEvents.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: e4bc8227ff827a2d89fa8f53690d95125f0d98cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4bc8227ff827a2d89fa8f53…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Sep 21 19:50:38 2021 -0400 user32/tests: Fix test_paint_messages() message sequences to support WinEvents. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 52cb7aa8eb4..a8cd85a791c 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -414,7 +414,7 @@ static const struct message WmSWP_FrameChanged_clip[] = { { WM_NCPAINT, sent }, /* wparam != 1 */ { WM_ERASEBKGND, sent }, { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_PAINT, sent }, { 0 } }; @@ -426,7 +426,7 @@ static const struct message WmSWP_FrameChangedDeferErase[] = { { WM_WINDOWPOSCHANGING, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_FRAMECHANGED }, { WM_NCCALCSIZE, sent|wparam|parent, 1 }, { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_PAINT, sent|parent|optional }, { WM_NCPAINT, sent|beginpaint|parent|optional }, /* wparam != 1 */ { WM_GETTEXT, sent|beginpaint|parent|defwinproc|optional }, @@ -447,7 +447,7 @@ static const struct message WmSWP_FrameChanged_noclip[] = { { WM_GETTEXT, sent|parent|defwinproc|optional }, { WM_ERASEBKGND, sent|parent|optional }, { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_PAINT, sent }, { WM_NCPAINT, sent|beginpaint }, /* wparam != 1 */ { WM_ERASEBKGND, sent|beginpaint|optional }, @@ -18530,6 +18530,9 @@ START_TEST(msg) test_listbox_messages(); test_combobox_messages(); test_wmime_keydown_message(); + test_paint_messages(); + test_interthread_messages(); + test_message_conversion(); /* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18540,9 +18543,6 @@ START_TEST(msg) } hEvent_hook = 0; - test_paint_messages(); - test_interthread_messages(); - test_message_conversion(); test_accelerators(); test_timers(); test_timers_no_wnd();
1
0
0
0
Connor McAdams : user32/tests: Fix test_listbox_messages() message sequences to support WinEvents.
by Alexandre Julliard
22 Sep '21
22 Sep '21
Module: wine Branch: master Commit: 39af41a12527fb4f0556694afd89c5dd597ae11c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=39af41a12527fb4f0556694a…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue Sep 21 19:50:37 2021 -0400 user32/tests: Fix test_listbox_messages() message sequences to support WinEvents. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index edad263bfab..52cb7aa8eb4 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -15173,8 +15173,8 @@ static const struct message wm_lb_setcursel_0[] = { LB_SETCURSEL, sent|wparam|lparam, 0, 0 }, { WM_CTLCOLORLISTBOX, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000120f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { 0 } }; static const struct message wm_lb_setcursel_1[] = @@ -15184,8 +15184,8 @@ static const struct message wm_lb_setcursel_1[] = { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000020f2 }, { WM_CTLCOLORLISTBOX, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000121f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 2 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 2 }, { 0 } }; static const struct message wm_lb_setcursel_2[] = @@ -15195,8 +15195,8 @@ static const struct message wm_lb_setcursel_2[] = { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000021f2 }, { WM_CTLCOLORLISTBOX, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000122f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 3 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 3 }, { 0 } }; static const struct message wm_lb_click_0[] = @@ -15206,14 +15206,14 @@ static const struct message wm_lb_click_0[] = { WM_KILLFOCUS, sent|parent }, { WM_IME_SETCONTEXT, sent|wparam|optional|parent, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001142f2 }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_LISTBOX, LBN_SETFOCUS) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 3 }, { WM_LBTRACKPOINT, sent|wparam|lparam|parent, 0, MAKELPARAM(1,1) }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000142f2 }, { WM_CTLCOLORLISTBOX, sent|parent }, @@ -15222,11 +15222,11 @@ static const struct message wm_lb_click_0[] = { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000120f2 }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001140f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_LISTBOX, LBN_SELCHANGE) }, { 0 } @@ -15234,6 +15234,7 @@ static const struct message wm_lb_click_0[] = static const struct message wm_lb_deletestring[] = { { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, @@ -15242,6 +15243,7 @@ static const struct message wm_lb_deletestring[] = static const struct message wm_lb_deletestring_reset[] = { { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { LB_RESETCONTENT, sent|wparam|lparam|defwinproc|optional, 0, 0 }, { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, @@ -15251,31 +15253,41 @@ static const struct message wm_lb_deletestring_reset[] = static const struct message wm_lb_addstring[] = { { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ef }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ed }, + /* Child ID changes each test, don't test lparam. */ + { EVENT_OBJECT_CREATE, winevent_hook|wparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ee }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { 0 } }; static const struct message wm_lb_addstring_ownerdraw[] = { { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ed }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf0f2, 0xf30604ed }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ee }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf1f2, 0xf30604ee }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 2 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ef }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf2f2, 0xf30604ef }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 3 }, { 0 } }; static const struct message wm_lb_addstring_sort_ownerdraw[] = { { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ed }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf0f2, 0xf30604ed }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 1 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ee }, { WM_COMPAREITEM, sent|wparam|lparam|parent, 0xf30604ed, 0xf30604ee }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf1f2, 0xf30604ee }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 2 }, { LB_ADDSTRING, sent|wparam|lparam, 0, 0xf30604ef }, { WM_COMPAREITEM, sent|wparam|lparam|parent, 0xf30604ed, 0xf30604ef }, { WM_COMPAREITEM, sent|wparam|lparam|parent, 0xf30604ee, 0xf30604ef }, { WM_MEASUREITEM, sent|wparam|lparam|parent, 0xf2f2, 0xf30604ef }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 3 }, { 0 } }; @@ -18515,6 +18527,9 @@ START_TEST(msg) test_autoradio_BM_CLICK(); test_autoradio_kbd_move(); test_static_messages(); + test_listbox_messages(); + test_combobox_messages(); + test_wmime_keydown_message(); /* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18525,9 +18540,6 @@ START_TEST(msg) } hEvent_hook = 0; - test_listbox_messages(); - test_combobox_messages(); - test_wmime_keydown_message(); test_paint_messages(); test_interthread_messages(); test_message_conversion();
1
0
0
0
Alistair Leslie-Hughes : sapi: Support create parameter in ISpObjectTokenCategory::SetId.
by Alexandre Julliard
21 Sep '21
21 Sep '21
Module: wine Branch: master Commit: e482605548b124a7863f6b09395b3a850ae741cc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e482605548b124a7863f6b09…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Sep 15 18:55:40 2021 +1000 sapi: Support create parameter in ISpObjectTokenCategory::SetId. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/sapi/token.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index ec1cce5f462..ba91a425e9e 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -416,9 +416,10 @@ static HRESULT WINAPI token_category_SetId( ISpObjectTokenCategory *iface, hr = parse_cat_id( id, &root, &subkey ); if (hr != S_OK) return SPERR_INVALID_REGISTRY_KEY; - if (create) FIXME( "Ignoring create\n" ); - - res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); + if (create) + res = RegCreateKeyExW( root, subkey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); + else + res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); if (res) return SPERR_INVALID_REGISTRY_KEY; hr = CoCreateInstance( &CLSID_SpDataKey, NULL, CLSCTX_ALL,
1
0
0
0
Alistair Leslie-Hughes : sapi: Support create parameter in ISpObjectToken::SetId.
by Alexandre Julliard
21 Sep '21
21 Sep '21
Module: wine Branch: master Commit: 5d11517f6d6bd1d2fd864ce3eb821602162c70d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d11517f6d6bd1d2fd864ce3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Sep 15 18:55:39 2021 +1000 sapi: Support create parameter in ISpObjectToken::SetId. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/sapi/token.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index 04fa3a25d6a..ec1cce5f462 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -942,7 +942,10 @@ static HRESULT WINAPI token_SetId( ISpObjectToken *iface, hr = parse_cat_id( token_id, &root, &subkey ); if (hr != S_OK) return SPERR_NOT_FOUND; - res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); + if (create) + res = RegCreateKeyExW( root, subkey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL); + else + res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); if (res) return SPERR_NOT_FOUND; This->token_key = key;
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
103
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Results per page:
10
25
50
100
200