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
April 2022
----- 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
1024 discussions
Start a n
N
ew thread
Hugh McMaster : regedit: Use wide character string literals in listview.c.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 49df6ad509920931de4092a9764233ea69f91b80 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49df6ad509920931de4092a9…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Apr 14 23:01:36 2022 +1000 regedit: Use wide character string literals in listview.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/listview.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index 0132cfb8db8..50157eb12ef 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -112,10 +112,9 @@ void format_value_data(HWND hwndLV, int index, DWORD type, void *data, DWORD siz { DWORD value = *(DWORD *)data; WCHAR buf[64]; - WCHAR format[] = {'0','x','%','0','8','x',' ','(','%','u',')',0}; if (type == REG_DWORD_BIG_ENDIAN) value = RtlUlongByteSwap(value); - wsprintfW(buf, format, value, value); + wsprintfW(buf, L"0x%08x (%u)", value, value); ListView_SetItemTextW(hwndLV, index, 2, buf); break; } @@ -130,9 +129,8 @@ void format_value_data(HWND hwndLV, int index, DWORD type, void *data, DWORD siz unsigned int i; BYTE *pData = data; WCHAR *strBinary = heap_xalloc(size * sizeof(WCHAR) * 3 + sizeof(WCHAR)); - WCHAR format[] = {'%','0','2','X',' ',0}; for (i = 0; i < size; i++) - wsprintfW( strBinary + i*3, format, pData[i] ); + wsprintfW( strBinary + i*3, L"%02X ", pData[i] ); strBinary[size * 3] = 0; ListView_SetItemTextW(hwndLV, index, 2, strBinary); heap_free(strBinary); @@ -242,17 +240,16 @@ static BOOL CreateListColumns(HWND hWndListView) void OnGetDispInfo(NMLVDISPINFOW *plvdi) { static WCHAR buffer[200]; - static WCHAR reg_szT[] = {'R','E','G','_','S','Z',0}, - reg_expand_szT[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}, - reg_binaryT[] = {'R','E','G','_','B','I','N','A','R','Y',0}, - reg_dwordT[] = {'R','E','G','_','D','W','O','R','D',0}, - reg_dword_big_endianT[] = {'R','E','G','_','D','W','O','R','D','_', - 'B','I','G','_','E','N','D','I','A','N',0}, - reg_multi_szT[] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0}, - reg_linkT[] = {'R','E','G','_','L','I','N','K',0}, - reg_resource_listT[] = {'R','E','G','_','R','E','S','O','U','R','C','E','_','L','I','S','T',0}, - reg_noneT[] = {'R','E','G','_','N','O','N','E',0}, - emptyT[] = {0}; + static WCHAR reg_szT[] = L"REG_SZ", + reg_expand_szT[] = L"REG_EXPAND_SZ", + reg_binaryT[] = L"REG_BINARY", + reg_dwordT[] = L"REG_DWORD", + reg_dword_big_endianT[] = L"REG_DWORD_BIG_ENDIAN", + reg_multi_szT[] = L"REG_MULTI_SZ", + reg_linkT[] = L"REG_LINK", + reg_resource_listT[] = L"REG_RESOURCE_LIST", + reg_noneT[] = L"REG_NONE", + emptyT[] = L""; plvdi->item.pszText = NULL; plvdi->item.cchTextMax = 0; @@ -295,8 +292,7 @@ void OnGetDispInfo(NMLVDISPINFOW *plvdi) break; default: { - WCHAR fmt[] = {'0','x','%','x',0}; - wsprintfW(buffer, fmt, data_type); + wsprintfW(buffer, L"0x%x", data_type); plvdi->item.pszText = buffer; break; } @@ -348,14 +344,13 @@ HWND CreateListView(HWND hwndParent, UINT id) { RECT rcClient; HWND hwndLV; - WCHAR ListView[] = {'L','i','s','t',' ','V','i','e','w',0}; /* prepare strings */ LoadStringW(hInst, IDS_REGISTRY_VALUE_NOT_SET, g_szValueNotSet, ARRAY_SIZE(g_szValueNotSet)); /* Get the dimensions of the parent window's client area, and create the list view control. */ GetClientRect(hwndParent, &rcClient); - hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, ListView, + hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, L"List View", WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS, 0, 0, rcClient.right, rcClient.bottom, hwndParent, ULongToHandle(id), hInst, NULL);
1
0
0
0
Hugh McMaster : regedit: Use wide character string literals in hexedit.c.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: f0d99995816ae2edb927ddc36bcc31eee7e4e59e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f0d99995816ae2edb927ddc3…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Apr 14 23:01:35 2022 +1000 regedit: Use wide character string literals in hexedit.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/hexedit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/programs/regedit/hexedit.c b/programs/regedit/hexedit.c index 7322a86e1f7..8227f201c29 100644 --- a/programs/regedit/hexedit.c +++ b/programs/regedit/hexedit.c @@ -55,8 +55,6 @@ typedef struct tagHEXEDIT_INFO INT nScrollPos; /* first visible line */ } HEXEDIT_INFO; -const WCHAR szHexEditClass[] = {'H','e','x','E','d','i','t',0}; - static inline LRESULT HexEdit_SetFont (HEXEDIT_INFO *infoPtr, HFONT hFont, BOOL redraw); static inline BYTE hexchar_to_byte(WCHAR ch) @@ -73,16 +71,13 @@ static inline BYTE hexchar_to_byte(WCHAR ch) static LPWSTR HexEdit_GetLineText(int offset, BYTE *pData, LONG cbData, LONG pad) { - static const WCHAR percent_04xW[] = {'%','0','4','X',' ',' ',0}; - static const WCHAR percent_02xW[] = {'%','0','2','X',' ',0}; - WCHAR *lpszLine = heap_xalloc((6 + cbData * 3 + pad * 3 + DIV_SPACES + cbData + 1) * sizeof(WCHAR)); LONG i; - wsprintfW(lpszLine, percent_04xW, offset); + wsprintfW(lpszLine, L"%04X ", offset); for (i = 0; i < cbData; i++) - wsprintfW(lpszLine + 6 + i*3, percent_02xW, pData[offset + i]); + wsprintfW(lpszLine + 6 + i*3, L"%02X ", pData[offset + i]); for (i = 0; i < pad * 3; i++) lpszLine[6 + cbData * 3 + i] = ' '; @@ -645,7 +640,7 @@ void HexEdit_Register(void) wndClass.cbWndExtra = sizeof(HEXEDIT_INFO *); wndClass.hCursor = LoadCursorW(0, (const WCHAR *)IDC_IBEAM); wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wndClass.lpszClassName = szHexEditClass; + wndClass.lpszClassName = L"HexEdit"; RegisterClassW(&wndClass); }
1
0
0
0
Hugh McMaster : regedit: Use wide character string literals in framewnd.c.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 5cc628e2be8fc849d0d6bf4a6e8ce19e8c9d4b63 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5cc628e2be8fc849d0d6bf4a…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Apr 14 23:01:34 2022 +1000 regedit: Use wide character string literals in framewnd.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/framewnd.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index 7a1507bb54e..88f05420675 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(regedit); * Global and Local Variables: */ -static const WCHAR favoritesKey[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','A','p','p','l','e','t','s','\\','R','e','g','E','d','i','t','\\','F','a','v','o','r','i','t','e','s',0}; +static const WCHAR favoritesKey[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit\\Favorites"; static BOOL bInMenuLoop = FALSE; /* Tells us if we are in the menu loop */ static WCHAR favoriteName[128]; static WCHAR searchString[128]; @@ -420,13 +420,12 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAMEW *pofn) if (FilterBuffer[0] == 0) { - static const WCHAR filterW[] = {'%','s','%','c','*','.','r','e','g','%','c','%','s','%','c','*','.','r','e','g','%','c','%','s','%','c','*','.','*','%','c',0}; WCHAR filter_reg[MAX_PATH], filter_reg4[MAX_PATH], filter_all[MAX_PATH]; LoadStringW(hInst, IDS_FILEDIALOG_FILTER_REG, filter_reg, MAX_PATH); LoadStringW(hInst, IDS_FILEDIALOG_FILTER_REG4, filter_reg4, MAX_PATH); LoadStringW(hInst, IDS_FILEDIALOG_FILTER_ALL, filter_all, MAX_PATH); - swprintf( FilterBuffer, ARRAY_SIZE(FilterBuffer), filterW, + swprintf( FilterBuffer, ARRAY_SIZE(FilterBuffer), L"%s%c*.reg%c%s%c*.reg%c%s%c*.*%c", filter_reg, 0, 0, filter_reg4, 0, 0, filter_all, 0, 0 ); } pofn->lpstrFilter = FilterBuffer; @@ -442,10 +441,8 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAMEW *pofn) static BOOL import_registry_filename(LPWSTR filename) { - static const WCHAR rb_mode[] = {'r','b',0}; - BOOL Success; - FILE* reg_file = _wfopen(filename, rb_mode); + FILE* reg_file = _wfopen(filename, L"rb"); if(!reg_file) return FALSE; @@ -1018,8 +1015,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case ID_HELP_HELPTOPICS: { - const WCHAR help_regedit[] = {'r','e','g','e','d','i','t',0}; - WinHelpW(hWnd, help_regedit, HELP_FINDER, 0); + WinHelpW(hWnd, L"regedit", HELP_FINDER, 0); break; } case ID_HELP_ABOUT: @@ -1059,11 +1055,9 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - static const WCHAR captionW[] = {'r','e','g','e','d','i','t',' ','c','h','i','l','d',' ','w','i','n','d','o','w',0}; - switch (message) { case WM_CREATE: - CreateWindowExW(0, szChildClass, captionW, WS_CHILD | WS_VISIBLE, + CreateWindowExW(0, szChildClass, L"regedit child window", WS_CHILD | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hWnd, NULL, hInst, 0); LoadStringW(hInst, IDS_EXPAND, expandW, ARRAY_SIZE(expandW)); @@ -1099,8 +1093,7 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa break; case WM_DESTROY: { - const WCHAR help_regedit[] = {'r','e','g','e','d','i','t',0}; - WinHelpW(hWnd, help_regedit, HELP_QUIT, 0); + WinHelpW(hWnd, L"regedit", HELP_QUIT, 0); PostQuitMessage(0); } default:
1
0
0
0
Hugh McMaster : regedit: Use wide character string literals in edit.c.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 789cf2837520f2969744ae5558a872bf2178c324 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=789cf2837520f2969744ae55…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Apr 14 23:01:33 2022 +1000 regedit: Use wide character string literals in edit.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/edit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 3f99626dd23..b808c38c51c 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -85,15 +85,12 @@ static void WINAPIV error_code_messagebox(HWND hwnd, unsigned int msg_id, ...) static BOOL change_dword_base(HWND hwndDlg, BOOL toHex) { - static const WCHAR percent_u[] = {'%','u',0}; - static const WCHAR percent_x[] = {'%','x',0}; - WCHAR buf[128]; DWORD val; if (!GetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, buf, ARRAY_SIZE(buf))) return FALSE; - if (!swscanf(buf, toHex ? percent_u : percent_x, &val)) return FALSE; - wsprintfW(buf, toHex ? percent_x : percent_u, val); + if (!swscanf(buf, toHex ? L"%u" : L"%x", &val)) return FALSE; + wsprintfW(buf, toHex ? L"%x" : L"%u", val); return SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, buf); } @@ -281,10 +278,9 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName) else error_code_messagebox(hwnd, IDS_SET_VALUE_FAILED); } } else if ( type == REG_DWORD ) { - static const WCHAR x[] = {'%','x',0}; DWORD value = *((DWORD*)stringValueData); stringValueData = heap_xrealloc(stringValueData, 64); - wsprintfW(stringValueData, x, value); + wsprintfW(stringValueData, L"%x", value); if (DialogBoxW(0, MAKEINTRESOURCEW(IDD_EDIT_DWORD), hwnd, modify_dlgproc) == IDOK) { DWORD val; CHAR* valueA = GetMultiByteString(stringValueData);
1
0
0
0
Hugh McMaster : regedit: Use wide character string literals in childwnd.c.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 6b6d084bd42bcd5a643fd8434d8432464abd7d97 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b6d084bd42bcd5a643fd843…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Apr 14 23:01:32 2022 +1000 regedit: Use wide character string literals in childwnd.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/childwnd.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index 582f3c0c177..704299be837 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -32,12 +32,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(regedit); ChildWnd* g_pChildWnd; static int last_split; -static const WCHAR wszLastKey[] = {'L','a','s','t','K','e','y',0}; -static const WCHAR wszKeyName[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'A','p','p','l','e','t','s','\\','R','e','g','e','d','i','t',0}; +static const WCHAR wszLastKey[] = L"LastKey"; +static const WCHAR wszKeyName[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"; /******************************************************************************* * Local module support methods @@ -58,11 +54,7 @@ static LPCWSTR GetRootKeyName(HKEY hRootKey) if(hRootKey == HKEY_DYN_DATA) return reg_class_namesW[INDEX_HKEY_DYN_DATA]; else - { - static const WCHAR unknown_key[] = {'U','N','K','N','O','W','N',' ','H','K','E','Y',',',' ', - 'P','L','E','A','S','E',' ','R','E','P','O','R','T',0}; - return unknown_key; - } + return L"Unknown HKEY. Please report."; } static void draw_splitbar(HWND hWnd, int x)
1
0
0
0
Francois Gouget : riched20/tests: Fix the spelling of a comment.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: f9fa5f9e523b45766f715c6981c6a6ab5f183157 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f9fa5f9e523b45766f715c69…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sat Apr 16 13:12:17 2022 +0200 riched20/tests: Fix the spelling of a comment. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/tests/richole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index c85a621b80b..c34c87ef646 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -3421,7 +3421,7 @@ static void _insert_reobject(struct reolecb_obj *callback, IRichEditOle *reole, HRESULT hr; olecb_expect_QueryInsertObject(callback, line, 1, - &CLSID_NULL, NULL, REO_CP_SELECTION /* cp overriden */, S_OK); + &CLSID_NULL, NULL, REO_CP_SELECTION /* cp overridden */, S_OK); hr = IRichEditOle_GetClientSite(reole, &clientsite); ok_(__FILE__,line)(hr == S_OK, "IRichEditOle_GetClientSite got hr %#lx.\n", hr); fill_reobject_struct(reobj, cp, NULL, NULL, clientsite, 10, 10, DVASPECT_CONTENT, 0, user);
1
0
0
0
Jacek Caban : win32u: Move NtUserFindWindowEx implementation from user32.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 0528f37fdd9b11cc95d074bb9e261d5127cb6ec3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0528f37fdd9b11cc95d074bb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 19 15:34:44 2022 +0200 win32u: Move NtUserFindWindowEx implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/win.c | 61 ++++++++----------------------------------------- dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 49 +++++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 16 +++++++++++++ include/ntuser.h | 2 ++ 7 files changed, 80 insertions(+), 52 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 511aa363af7..99ee93adba7 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -738,65 +738,24 @@ BOOL WINAPI OpenIcon( HWND hwnd ) /*********************************************************************** * FindWindowExW (USER32.@) */ -HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR title ) +HWND WINAPI FindWindowExW( HWND parent, HWND child, const WCHAR *class, const WCHAR *title ) { - HWND *list; - HWND retvalue = 0; - int i = 0, len = 0; - WCHAR *buffer = NULL; - - if (!parent && child) parent = GetDesktopWindow(); - else if (parent == HWND_MESSAGE) parent = get_hwnd_message_parent(); - - if (title) - { - len = lstrlenW(title) + 1; /* one extra char to check for chars beyond the end */ - if (!(buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) return 0; - } - - if (className) - { - UNICODE_STRING str; - if (IS_INTRESOURCE(className)) - { - str.Buffer = (WCHAR *)className; - str.Length = str.MaximumLength = 0; - } - else RtlInitUnicodeString( &str, className ); - list = list_window_children( 0, parent, &str, 0 ); - } - else list = list_window_children( 0, parent, NULL, 0 ); - if (!list) goto done; + UNICODE_STRING class_str, title_str; - if (child) - { - child = WIN_GetFullHandle( child ); - while (list[i] && list[i] != child) i++; - if (!list[i]) goto done; - i++; /* start from next window */ - } + if (title) RtlInitUnicodeString( &title_str, title ); - if (title) + if (class) { - while (list[i]) + if (IS_INTRESOURCE(class)) { - if (NtUserInternalGetWindowText( list[i], buffer, len + 1 )) - { - if (!wcsicmp( buffer, title )) break; - } - else - { - if (!title[0]) break; - } - i++; + class_str.Buffer = (WCHAR *)class; + class_str.Length = class_str.MaximumLength = 0; } + else RtlInitUnicodeString( &class_str, class ); } - retvalue = list[i]; - done: - HeapFree( GetProcessHeap(), 0, list ); - HeapFree( GetProcessHeap(), 0, buffer ); - return retvalue; + return NtUserFindWindowEx( parent, child, class ? &class_str : NULL, + title ? &title_str : NULL, 0 ); } diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 437fe6d0758..f88b8fa30da 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -116,6 +116,7 @@ static void * const syscalls[] = NtUserCreateWindowStation, NtUserDestroyAcceleratorTable, NtUserFindExistingCursorIcon, + NtUserFindWindowEx, NtUserGetAncestor, NtUserGetAtomName, NtUserGetClassName, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index afb413f8726..98bfbb33a2d 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -882,7 +882,7 @@ @ stdcall NtUserExcludeUpdateRgn(long long) @ stub NtUserFillWindow @ stdcall -syscall NtUserFindExistingCursorIcon(ptr ptr ptr) -@ stub NtUserFindWindowEx +@ stdcall -syscall NtUserFindWindowEx(long long ptr ptr long) @ stdcall NtUserFlashWindowEx(ptr) @ stub NtUserForceWindowToDpiForTest @ stub NtUserFrostCrashedWindow diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 1026b706832..93d92c60de6 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2513,6 +2513,55 @@ NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULON return STATUS_SUCCESS; } +/*********************************************************************** + * NtUserFindWindowEx (USER32.@) + */ +HWND WINAPI NtUserFindWindowEx( HWND parent, HWND child, UNICODE_STRING *class, UNICODE_STRING *title, + ULONG unk ) +{ + HWND *list; + HWND retvalue = 0; + int i = 0, len = 0, title_len; + WCHAR *buffer = NULL; + + if (!parent && child) parent = get_desktop_window(); + else if (parent == HWND_MESSAGE) parent = get_hwnd_message_parent(); + + if (title) + { + len = title->Length / sizeof(WCHAR) + 1; /* one extra char to check for chars beyond the end */ + if (!(buffer = malloc( (len + 1) * sizeof(WCHAR) ))) return 0; + } + + if (!(list = list_window_children( 0, parent, class, 0 ))) goto done; + + if (child) + { + child = get_full_window_handle( child ); + while (list[i] && list[i] != child) i++; + if (!list[i]) goto done; + i++; /* start from next window */ + } + + if (title) + { + while (list[i]) + { + title_len = NtUserInternalGetWindowText( list[i], buffer, len + 1 ); + if (title_len * sizeof(WCHAR) == title->Length && + (!title_len || !wcsnicmp( buffer, title->Buffer, title_len ))) + break; + i++; + } + } + retvalue = list[i]; + + done: + free( list ); + free( buffer ); + return retvalue; +} + /* Retrieve the window text from the server. */ static data_size_t get_server_window_text( HWND hwnd, WCHAR *text, data_size_t count ) { diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index c4e4f7ac219..c1d41c2be43 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -103,6 +103,7 @@ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \ + SYSCALL_ENTRY( NtUserFindWindowEx ) \ SYSCALL_ENTRY( NtUserGetAncestor ) \ SYSCALL_ENTRY( NtUserGetAtomName ) \ SYSCALL_ENTRY( NtUserGetClassName ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 2af398cfed9..d916680660a 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -259,6 +259,22 @@ NTSTATUS WINAPI wow64_NtUserBuildHwndList( UINT *args ) return status; } +NTSTATUS WINAPI wow64_NtUserFindWindowEx( UINT *args ) +{ + HWND parent = get_handle( &args ); + HWND child = get_handle( &args ); + UNICODE_STRING32 *class32 = get_ptr( &args ); + UNICODE_STRING32 *title32 = get_ptr( &args ); + ULONG unk = get_ulong( &args ); + + UNICODE_STRING class, title; + HWND ret; + + ret = NtUserFindWindowEx( parent, child, unicode_str_32to64( &class, class32 ), + unicode_str_32to64( &title, title32 ), unk ); + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtUserInternalGetWindowText( UINT *args ) { HWND hwnd = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index 8eafd78beef..879eed4bf79 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -458,6 +458,8 @@ BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode, INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd ); HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STRING *res_name, void *desc ); +HWND WINAPI NtUserFindWindowEx( HWND parent, HWND child, UNICODE_STRING *class, + UNICODE_STRING *title, ULONG unk ); BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ); HWND WINAPI NtUserGetAncestor( HWND hwnd, UINT type ); SHORT WINAPI NtUserGetAsyncKeyState( INT key );
1
0
0
0
Jacek Caban : winex11: Directly use ntdll in display_device_init mutex.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 12cb04fd2f13707e5b7eeed24f0ef916e71cd4fb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=12cb04fd2f13707e5b7eeed2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 19 15:31:53 2022 +0200 winex11: Directly use ntdll in display_device_init mutex. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/display.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index 928d2bd16f0..f90cc455c36 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -29,17 +29,21 @@ struct x11drv_display_device_handler desktop_handler; HANDLE get_display_device_init_mutex(void) { - static const WCHAR init_mutexW[] = {'d','i','s','p','l','a','y','_','d','e','v','i','c','e','_','i','n','i','t',0}; - HANDLE mutex = CreateMutexW(NULL, FALSE, init_mutexW); - - WaitForSingleObject(mutex, INFINITE); + static const WCHAR init_mutexW[] = {'d','i','s','p','l','a','y','_','d','e','v','i','c','e','_','i','n','i','t'}; + UNICODE_STRING name = { sizeof(init_mutexW), sizeof(init_mutexW), (WCHAR *)init_mutexW }; + OBJECT_ATTRIBUTES attr; + HANDLE mutex = 0; + + InitializeObjectAttributes( &attr, &name, OBJ_OPENIF, NULL, NULL ); + NtCreateMutant( &mutex, MUTEX_ALL_ACCESS, &attr, FALSE ); + if (mutex) NtWaitForSingleObject( mutex, FALSE, NULL ); return mutex; } void release_display_device_init_mutex(HANDLE mutex) { - ReleaseMutex(mutex); - CloseHandle(mutex); + NtReleaseMutant( mutex, NULL ); + NtClose( mutex ); } POINT virtual_screen_to_root(INT x, INT y)
1
0
0
0
Jacek Caban : winex11: Use TEB to store driver thread data.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: db9b7b0f511197255d0cbe81605a42e34bf630d6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=db9b7b0f511197255d0cbe81…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 19 15:31:41 2022 +0200 winex11: Use TEB to store driver thread data. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/x11drv.h | 6 +----- dlls/winex11.drv/x11drv_main.c | 9 +++------ include/ntuser.h | 1 + 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 7ac31e326c6..900f24c4002 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -478,8 +478,8 @@ static BOOL process_events( Display *display, Bool (*filter)(Display*, XEvent*,X DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout, DWORD mask, DWORD flags ) { + struct x11drv_thread_data *data = x11drv_thread_data(); DWORD ret; - struct x11drv_thread_data *data = TlsGetValue( thread_data_tls_index ); if (!data) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 086e66b2366..23886936dd4 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -395,14 +395,10 @@ struct x11drv_thread_data }; extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN; -extern DWORD thread_data_tls_index DECLSPEC_HIDDEN; static inline struct x11drv_thread_data *x11drv_thread_data(void) { - DWORD err = GetLastError(); /* TlsGetValue always resets last error */ - struct x11drv_thread_data *data = TlsGetValue( thread_data_tls_index ); - SetLastError( err ); - return data; + return NtUserGetThreadInfo()->driver_data; } /* retrieve the thread display, or NULL if not created yet */ diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 203237f24aa..14ee13dc676 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -81,7 +81,6 @@ BOOL client_side_with_render = TRUE; BOOL shape_layered_windows = TRUE; int copy_default_colors = 128; int alloc_system_colors = 256; -DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; int xrender_error_base = 0; HMODULE x11drv_module = 0; char *process_name = NULL; @@ -650,8 +649,6 @@ static BOOL process_attach(void) setup_options(); - if ((thread_data_tls_index = TlsAlloc()) == TLS_OUT_OF_INDEXES) return FALSE; - /* Open display */ if (!XInitThreads()) ERR( "XInitThreads failed, trouble ahead\n" ); @@ -702,7 +699,7 @@ static BOOL process_attach(void) */ void X11DRV_ThreadDetach(void) { - struct x11drv_thread_data *data = TlsGetValue( thread_data_tls_index ); + struct x11drv_thread_data *data = x11drv_thread_data(); if (data) { @@ -712,7 +709,7 @@ void X11DRV_ThreadDetach(void) XCloseDisplay( data->display ); HeapFree( GetProcessHeap(), 0, data ); /* clear data in case we get re-entered from user32 before the thread is truly dead */ - TlsSetValue( thread_data_tls_index, NULL ); + NtUserGetThreadInfo()->driver_data = NULL; } } @@ -773,7 +770,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) if (TRACE_ON(synchronous)) XSynchronize( data->display, True ); set_queue_display_fd( data->display ); - TlsSetValue( thread_data_tls_index, data ); + NtUserGetThreadInfo()->driver_data = data; if (use_xim) X11DRV_SetupXIM(); diff --git a/include/ntuser.h b/include/ntuser.h index e391940d63e..8eafd78beef 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -45,6 +45,7 @@ enum /* TEB thread info, not compatible with Windows */ struct ntuser_thread_info { + void *driver_data; /* driver-specific data */ DWORD message_time; /* value for GetMessageTime */ DWORD message_pos; /* value for GetMessagePos */ ULONG_PTR message_extra; /* value for GetMessageExtraInfo */
1
0
0
0
Jacek Caban : winex11: Use NtUserGetThreadInfo to access thread data.
by Alexandre Julliard
19 Apr '22
19 Apr '22
Module: wine Branch: master Commit: 3e94864540fd1cd7dbd71f48a4c5e81a915357c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3e94864540fd1cd7dbd71f48…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 19 15:31:17 2022 +0200 winex11: Use NtUserGetThreadInfo to access thread data. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/sysparams.c | 3 --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/mouse.c | 2 +- include/ntuser.h | 6 ------ 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 535f3bdb95b..32da544c157 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -4638,9 +4638,6 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) case NtUserCallNoParam_GetInputState: return get_input_state(); - case NtUserCallNoParam_GetMessagePos: - return NtUserGetThreadInfo()->message_pos; - case NtUserCallNoParam_ReleaseCapture: return release_capture(); diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 147865e7af6..7ac31e326c6 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -572,7 +572,7 @@ static void set_input_focus( struct x11drv_win_data *data ) if (EVENT_x11_time_to_win32_time(0)) /* ICCCM says don't use CurrentTime, so try to use last message time if possible */ /* FIXME: this is not entirely correct */ - timestamp = GetMessageTime() - EVENT_x11_time_to_win32_time(0); + timestamp = NtUserGetThreadInfo()->message_time - EVENT_x11_time_to_win32_time(0); else timestamp = CurrentTime; diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 3a6b9855ab0..82d3e17a0d1 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1617,7 +1617,7 @@ void move_resize_window( HWND hwnd, int dir ) if (!(win = X11DRV_get_whole_window( hwnd ))) return; - pt = NtUserGetMessagePos(); + pt = NtUserGetThreadInfo()->message_pos; pos = virtual_screen_to_root( (short)LOWORD( pt ), (short)HIWORD( pt ) ); if (NtUserGetKeyState( VK_LBUTTON ) & 0x8000) button = 1; diff --git a/include/ntuser.h b/include/ntuser.h index 2f1f9893ea9..e391940d63e 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -596,7 +596,6 @@ enum { NtUserCallNoParam_GetDesktopWindow, NtUserCallNoParam_GetInputState, - NtUserCallNoParam_GetMessagePos, NtUserCallNoParam_ReleaseCapture, /* temporary exports */ NtUserExitingThread, @@ -614,11 +613,6 @@ static inline BOOL NtUserGetInputState(void) return NtUserCallNoParam( NtUserCallNoParam_GetInputState ); } -static inline DWORD NtUserGetMessagePos(void) -{ - return NtUserCallNoParam( NtUserCallNoParam_GetMessagePos ); -} - static inline BOOL NtUserReleaseCapture(void) { return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture );
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
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