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
May 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
770 discussions
Start a n
N
ew thread
Francois Gouget : user32/tests: Remove the Cygwin/XFree86 checks.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 07293cfe7db3e2d921049e19fc1f1dc86629f90a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=07293cfe7db3e2d921049e19…
Author: Francois Gouget <fgouget(a)free.fr> Date: Fri May 7 19:39:12 2021 +0200 user32/tests: Remove the Cygwin/XFree86 checks. They are very old and likely no longer relevant. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/sysparams.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index d49d69989f6..8fab62c951e 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -821,13 +821,6 @@ static void test_SPI_SETBORDER( void ) /* 6 */ "Control Panel\\Desktop\\WindowMetrics","CaptionWidth", dpi); ncmsave.iCaptionWidth = CaptionWidth; - /* These tests hang when XFree86 4.0 for Windows is running (tested on - * WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is - * running. - */ - if (FindWindowA( NULL, "Cygwin/XFree86" )) - return; - trace("testing SPI_{GET,SET}BORDER\n"); SetLastError(0xdeadbeef); @@ -1127,13 +1120,6 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */ unsigned int i; ICONMETRICSA im; - /* These tests hang when XFree86 4.0 for Windows is running (tested on - * WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is - * running. - */ - if (FindWindowA( NULL, "Cygwin/XFree86" )) - return; - trace("testing SPI_{GET,SET}ICONTITLEWRAP\n"); SetLastError(0xdeadbeef); rc=SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &old_b, 0 );
1
0
0
0
Rémi Bernon : user32: Read "Layout Id" from registry in LoadKeyboardLayoutW.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 3e2b225428137fd425f677ef182204f3d553afab URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3e2b225428137fd425f677ef…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 7 10:29:46 2021 +0200 user32: Read "Layout Id" from registry in LoadKeyboardLayoutW. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/input.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index fc928af6723..5d9bbe14cd6 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -1540,7 +1540,9 @@ BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) */ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags ) { - DWORD tmp; + WCHAR layout_path[MAX_PATH], value[5]; + DWORD value_size, tmp; + HKEY hkey; HKL layout; FIXME_(keyboard)( "name %s, flags %x, semi-stub!\n", debugstr_w( name ), flags ); @@ -1548,6 +1550,18 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags ) tmp = wcstoul( name, NULL, 16 ); layout = UlongToHandle( tmp ); + wcscpy( layout_path, L"System\\CurrentControlSet\\Control\\Keyboard Layouts\\" ); + wcscat( layout_path, name ); + + if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, layout_path, &hkey )) + { + value_size = sizeof(value); + if (!RegGetValueW( hkey, NULL, L"Layout Id", RRF_RT_REG_SZ, NULL, (void *)&value, &value_size )) + layout = UlongToHandle( MAKELONG( LOWORD( tmp ), 0xf000 | (wcstoul( value, NULL, 16 ) & 0xfff) ) ); + + RegCloseKey( hkey ); + } + if ((flags & KLF_ACTIVATE) && ActivateKeyboardLayout( layout, 0 )) return layout; /* FIXME: semi-stub: returning default layout */
1
0
0
0
Rémi Bernon : user32: Implement KLF_ACTIVATE flag in LoadKeyboardLayoutW.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: bda517c08517f048b68a6f7cf152ef836b21a715 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bda517c08517f048b68a6f7c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 7 10:29:45 2021 +0200 user32: Implement KLF_ACTIVATE flag in LoadKeyboardLayoutW. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/input.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 6f4636dffdb..fc928af6723 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -1540,7 +1540,16 @@ BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) */ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags ) { + DWORD tmp; + HKL layout; + FIXME_(keyboard)( "name %s, flags %x, semi-stub!\n", debugstr_w( name ), flags ); + + tmp = wcstoul( name, NULL, 16 ); + layout = UlongToHandle( tmp ); + + if ((flags & KLF_ACTIVATE) && ActivateKeyboardLayout( layout, 0 )) return layout; + /* FIXME: semi-stub: returning default layout */ return get_locale_kbd_layout(); }
1
0
0
0
Rémi Bernon : user32: Move (Un)LoadKeyboardLayoutW from winex11.drv to user32.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 4bec69b10471c84a4a171a9188a6a340296ae6ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4bec69b10471c84a4a171a91…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 7 10:29:44 2021 +0200 user32: Move (Un)LoadKeyboardLayoutW from winex11.drv to user32. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/driver.c | 26 -------------------------- dlls/user32/input.c | 16 ++++++++-------- dlls/user32/user_private.h | 2 -- dlls/winex11.drv/keyboard.c | 21 --------------------- dlls/winex11.drv/winex11.drv.spec | 2 -- 5 files changed, 8 insertions(+), 59 deletions(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 36438fa44c8..1c3b62eff2b 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -109,11 +109,9 @@ static const USER_DRIVER *load_driver(void) GET_USER_FUNC(Beep); GET_USER_FUNC(GetKeyNameText); GET_USER_FUNC(GetKeyboardLayoutList); - GET_USER_FUNC(LoadKeyboardLayout); GET_USER_FUNC(MapVirtualKeyEx); GET_USER_FUNC(RegisterHotKey); GET_USER_FUNC(ToUnicodeEx); - GET_USER_FUNC(UnloadKeyboardLayout); GET_USER_FUNC(UnregisterHotKey); GET_USER_FUNC(VkKeyScanEx); GET_USER_FUNC(DestroyCursorIcon); @@ -204,11 +202,6 @@ static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size ) return -1; /* use default implementation */ } -static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags ) -{ - return 0; -} - static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout ) { return -1; /* use default implementation */ @@ -225,11 +218,6 @@ static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, L return -2; /* use default implementation */ } -static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout ) -{ - return 0; -} - static void CDECL nulldrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) { } @@ -416,11 +404,9 @@ static USER_DRIVER null_driver = nulldrv_Beep, nulldrv_GetKeyNameText, nulldrv_GetKeyboardLayoutList, - nulldrv_LoadKeyboardLayout, nulldrv_MapVirtualKeyEx, nulldrv_RegisterHotKey, nulldrv_ToUnicodeEx, - nulldrv_UnloadKeyboardLayout, nulldrv_UnregisterHotKey, nulldrv_VkKeyScanEx, /* cursor/icon functions */ @@ -493,11 +479,6 @@ static UINT CDECL loaderdrv_GetKeyboardLayoutList( INT size, HKL *layouts ) return load_driver()->pGetKeyboardLayoutList( size, layouts ); } -static HKL CDECL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags ) -{ - return load_driver()->pLoadKeyboardLayout( name, flags ); -} - static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout ) { return load_driver()->pMapVirtualKeyEx( code, type, layout ); @@ -514,11 +495,6 @@ static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, return load_driver()->pToUnicodeEx( virt, scan, state, str, size, flags, layout ); } -static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout ) -{ - return load_driver()->pUnloadKeyboardLayout( layout ); -} - static void CDECL loaderdrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) { load_driver()->pUnregisterHotKey( hwnd, modifiers, vk ); @@ -619,11 +595,9 @@ static USER_DRIVER lazy_load_driver = loaderdrv_Beep, loaderdrv_GetKeyNameText, loaderdrv_GetKeyboardLayoutList, - loaderdrv_LoadKeyboardLayout, loaderdrv_MapVirtualKeyEx, loaderdrv_RegisterHotKey, loaderdrv_ToUnicodeEx, - loaderdrv_UnloadKeyboardLayout, loaderdrv_UnregisterHotKey, loaderdrv_VkKeyScanEx, /* cursor/icon functions */ diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 1b2360ea083..6f4636dffdb 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -1538,11 +1538,11 @@ BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) /*********************************************************************** * LoadKeyboardLayoutW (USER32.@) */ -HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags) +HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags ) { - TRACE_(keyboard)("(%s, %d)\n", debugstr_w(pwszKLID), Flags); - - return USER_Driver->pLoadKeyboardLayout(pwszKLID, Flags); + FIXME_(keyboard)( "name %s, flags %x, semi-stub!\n", debugstr_w( name ), flags ); + /* FIXME: semi-stub: returning default layout */ + return get_locale_kbd_layout(); } /*********************************************************************** @@ -1565,11 +1565,11 @@ HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) /*********************************************************************** * UnloadKeyboardLayout (USER32.@) */ -BOOL WINAPI UnloadKeyboardLayout(HKL hkl) +BOOL WINAPI UnloadKeyboardLayout( HKL layout ) { - TRACE_(keyboard)("(%p)\n", hkl); - - return USER_Driver->pUnloadKeyboardLayout(hkl); + FIXME_(keyboard)( "layout %p, stub!\n", layout ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; } typedef struct __TRACKINGLIST { diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 1bc41888891..db082462f1b 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -66,11 +66,9 @@ typedef struct tagUSER_DRIVER { void (CDECL *pBeep)(void); INT (CDECL *pGetKeyNameText)(LONG, LPWSTR, INT); UINT (CDECL *pGetKeyboardLayoutList)(INT, HKL *); - HKL (CDECL *pLoadKeyboardLayout)(LPCWSTR, UINT); UINT (CDECL *pMapVirtualKeyEx)(UINT, UINT, HKL); BOOL (CDECL *pRegisterHotKey)(HWND, UINT, UINT); INT (CDECL *pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL); - BOOL (CDECL *pUnloadKeyboardLayout)(HKL); void (CDECL *pUnregisterHotKey)(HWND, UINT, UINT); SHORT (CDECL *pVkKeyScanEx)(WCHAR, HKL); /* cursor/icon functions */ diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 7cf2d84ac3c..d86f418a64e 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1850,27 +1850,6 @@ static BOOL match_x11_keyboard_layout(HKL hkl) } -/*********************************************************************** - * LoadKeyboardLayout (X11DRV.@) - */ -HKL CDECL X11DRV_LoadKeyboardLayout(LPCWSTR name, UINT flags) -{ - FIXME("%s, %04x: semi-stub! Returning default layout.\n", debugstr_w(name), flags); - return get_locale_kbd_layout(); -} - - -/*********************************************************************** - * UnloadKeyboardLayout (X11DRV.@) - */ -BOOL CDECL X11DRV_UnloadKeyboardLayout(HKL hkl) -{ - FIXME("%p: stub!\n", hkl); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - - /*********************************************************************** * ActivateKeyboardLayout (X11DRV.@) */ diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index eb5f7cecc6c..89b9323a6c5 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -7,10 +7,8 @@ @ cdecl ActivateKeyboardLayout(long long) X11DRV_ActivateKeyboardLayout @ cdecl Beep() X11DRV_Beep @ cdecl GetKeyNameText(long ptr long) X11DRV_GetKeyNameText -@ cdecl LoadKeyboardLayout(wstr long) X11DRV_LoadKeyboardLayout @ cdecl MapVirtualKeyEx(long long long) X11DRV_MapVirtualKeyEx @ cdecl ToUnicodeEx(long long ptr ptr long long long) X11DRV_ToUnicodeEx -@ cdecl UnloadKeyboardLayout(long) X11DRV_UnloadKeyboardLayout @ cdecl VkKeyScanEx(long long) X11DRV_VkKeyScanEx @ cdecl DestroyCursorIcon(long) X11DRV_DestroyCursorIcon @ cdecl SetCursor(long) X11DRV_SetCursor
1
0
0
0
Rémi Bernon : user32: Cache current keyboard layout name.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 30460460e52731ef2979c4b528cb4fdc86dacac7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=30460460e52731ef2979c4b5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 7 10:29:43 2021 +0200 user32: Cache current keyboard layout name. To avoid iterating the registry every time GetKeyboardLayoutNameW is called. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/input.c | 10 ++++++++++ dlls/user32/user_private.h | 1 + 2 files changed, 11 insertions(+) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index adeb4f66804..1b2360ea083 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -1129,6 +1129,7 @@ BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pszKLID) */ BOOL WINAPI GetKeyboardLayoutNameW( WCHAR *name ) { + struct user_thread_info *info = get_user_thread_info(); WCHAR klid[KL_NAMELENGTH], value[5]; DWORD value_size, tmp, i = 0; HKEY hkey; @@ -1142,6 +1143,12 @@ BOOL WINAPI GetKeyboardLayoutNameW( WCHAR *name ) return FALSE; } + if (info->kbd_layout_id) + { + swprintf( name, KL_NAMELENGTH, L"%08X", info->kbd_layout_id ); + return TRUE; + } + layout = GetKeyboardLayout( 0 ); tmp = HandleToUlong( layout ); if (HIWORD( tmp ) == LOWORD( tmp )) tmp = LOWORD( tmp ); @@ -1166,6 +1173,8 @@ BOOL WINAPI GetKeyboardLayoutNameW( WCHAR *name ) RegCloseKey( hkey ); } + info->kbd_layout_id = wcstoul( name, NULL, 16 ); + TRACE_(keyboard)( "ret %s\n", debugstr_w( name ) ); return TRUE; } @@ -1394,6 +1403,7 @@ HKL WINAPI ActivateKeyboardLayout( HKL layout, UINT flags ) old_layout = info->kbd_layout; info->kbd_layout = layout; + if (old_layout != layout) info->kbd_layout_id = 0; if (!old_layout) return get_locale_kbd_layout(); return old_layout; diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 1c7ac3355bc..1bc41888891 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -198,6 +198,7 @@ struct user_thread_info ULONG_PTR GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */ struct user_key_state_info *key_state; /* Cache of global key state */ HKL kbd_layout; /* Current keyboard layout */ + DWORD kbd_layout_id; /* Current keyboard layout ID */ HWND top_window; /* Desktop window */ HWND msg_window; /* HWND_MESSAGE parent window */ struct rawinput_thread_data *rawinput; /* RawInput thread local data / buffer */
1
0
0
0
Rémi Bernon : user32/tests: Add tests for keyboard layout preload list.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: b943a69c1b2bb1ad1769702be22d72194e8c333e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b943a69c1b2bb1ad1769702b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 7 10:29:42 2021 +0200 user32/tests: Add tests for keyboard layout preload list. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/input.c | 78 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index b45adeb3cae..3d4f0d03d0d 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -3072,9 +3072,10 @@ static void test_get_async_key_state(void) static void test_keyboard_layout_name(void) { WCHAR klid[KL_NAMELENGTH], tmpklid[KL_NAMELENGTH], layout_path[MAX_PATH], value[5]; - HKL layout, tmplayout, layouts[64]; - DWORD status, value_size; - int i, len; + HKL layout, tmplayout, *layouts, *layouts_preload; + DWORD status, value_size, klid_size, type, id; + int i, j, len; + HKEY hkey; BOOL ret; if (0) /* crashes on native system */ @@ -3087,15 +3088,77 @@ static void test_keyboard_layout_name(void) layout = GetKeyboardLayout(0); - len = GetKeyboardLayoutList(ARRAY_SIZE(layouts), layouts); + len = GetKeyboardLayoutList(0, NULL); + ok(len > 0, "GetKeyboardLayoutList returned %d\n", len); + + layouts = malloc(len * sizeof(HKL)); + ok(layouts != NULL, "Could not allocate memory\n"); + + len = GetKeyboardLayoutList(len, layouts); ok(len > 0, "GetKeyboardLayoutList returned %d\n", len); + layouts_preload = calloc(len, sizeof(HKL)); + ok(layouts_preload != NULL, "Could not allocate memory\n"); + + if (!RegOpenKeyW( HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", &hkey )) + { + i = 0; + type = REG_SZ; + klid_size = sizeof(klid); + value_size = ARRAY_SIZE(value); + while (i < len && !RegEnumValueW( hkey, i++, value, &value_size, NULL, &type, (void *)&klid, &klid_size )) + { + klid_size = sizeof(klid); + value_size = ARRAY_SIZE(value); + layouts_preload[i - 1] = UlongToHandle( wcstoul( klid, NULL, 16 ) ); + + id = (DWORD_PTR)layouts_preload[i - 1]; + if (id & 0x80000000) todo_wine_if(HIWORD(id) == 0xe001) ok((id & 0xf0000000) == 0xd0000000, "Unexpected preloaded keyboard layout high bits %#x\n", id); + else ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#x\n", id); + } + + ok(i <= len, "Unexpected keyboard count %d in preload list\n", i); + RegCloseKey( hkey ); + } + + if (!RegOpenKeyW( HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes", &hkey )) + { + for (i = 0; i < len && layouts_preload[i]; ++i) + { + type = REG_SZ; + klid_size = sizeof(klid); + swprintf( tmpklid, KL_NAMELENGTH, L"%08x", HandleToUlong( layouts_preload[i] ) ); + if (!RegQueryValueExW( hkey, tmpklid, NULL, &type, (void *)&klid, &klid_size )) + { + layouts_preload[i] = UlongToHandle( wcstoul( klid, NULL, 16 ) ); + + /* Substitute should contain the keyboard layout id, not the HKL high word */ + id = (DWORD_PTR)layouts_preload[i]; + ok(!(id & 0xf0000000), "Unexpected substitute keyboard layout high bits %#x\n", id); + } + else + { + id = (DWORD_PTR)layouts_preload[i]; + ok(!(id & 0xf0000000), "Unexpected preloaded keyboard layout high bits %#x\n", id); + } + } + + RegCloseKey( hkey ); + } + for (i = len - 1; i >= 0; --i) { - UINT id = (UINT_PTR)layouts[i]; + id = (DWORD_PTR)layouts[i]; ActivateKeyboardLayout(layouts[i], 0); GetKeyboardLayoutNameW(klid); + for (j = 0; j < len; ++j) + { + swprintf( tmpklid, KL_NAMELENGTH, L"%08X", layouts_preload[j] ); + if (!wcscmp( tmpklid, klid )) break; + } + ok(j < len, "Could not find keyboard layout %p in preload list\n", layout); + if (id & 0x80000000) { todo_wine ok((id >> 28) == 0xf, "hkl high bits %#x, expected 0xf\n", id >> 28); @@ -3120,7 +3183,7 @@ static void test_keyboard_layout_name(void) tmplayout = LoadKeyboardLayoutW(klid, KLF_ACTIVATE); /* The low word of HKL is the selected user lang and may be different as LoadKeyboardLayoutW also selects the default lang from the layout */ - ok(((UINT_PTR)tmplayout & ~0xffff) == ((UINT_PTR)layouts[i] & ~0xffff), "GetKeyboardLayout returned %p, expected %p\n", tmplayout, layouts[i]); + ok(((UINT_PTR)tmplayout & ~0xffff) == ((UINT_PTR)layouts[i] & ~0xffff), "LoadKeyboardLayoutW returned %p, expected %p\n", tmplayout, layouts[i]); /* The layout name only depends on the keyboard layout: the high word of HKL. */ GetKeyboardLayoutNameW(tmpklid); @@ -3128,6 +3191,9 @@ static void test_keyboard_layout_name(void) } ActivateKeyboardLayout(layout, 0); + + free(layouts); + free(layouts_preload); } static void test_key_names(void)
1
0
0
0
Hans Leidekker : secur32: Use CRT memory allocators.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: fbd30fff038645bf2f7967ff63d4178309a14138 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fbd30fff038645bf2f7967ff…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 7 11:54:44 2021 +0200 secur32: Use CRT memory allocators. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/lsa.c | 56 ++++++----- dlls/secur32/negotiate.c | 41 ++++---- dlls/secur32/schannel.c | 64 ++++++------ dlls/secur32/secur32.c | 148 ++++++++++------------------ dlls/secur32/secur32_priv.h | 8 +- dlls/secur32/thunks.c | 235 +++++++++++++++++++------------------------- dlls/secur32/wrapper.c | 40 ++++---- 7 files changed, 255 insertions(+), 337 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=fbd30fff038645bf2f79…
1
0
0
0
Hans Leidekker : secur32: Use wide character string literals.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 49dbde22bdeec66a657b0ae283c22f2b83711c1f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49dbde22bdeec66a657b0ae2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 7 11:54:43 2021 +0200 secur32: Use wide character string literals. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/lsa.c | 5 +-- dlls/secur32/schannel.c | 91 +++++++++++++++++++------------------------------ dlls/secur32/secur32.c | 44 ++++++++---------------- 3 files changed, 50 insertions(+), 90 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=49dbde22bdeec66a657b…
1
0
0
0
Hans Leidekker : secur32: Build with msvcrt.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 04c6862d3f11819ce2df0e135481773a02b86787 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=04c6862d3f11819ce2df0e13…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 7 11:54:42 2021 +0200 secur32: Build with msvcrt. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/Makefile.in | 2 ++ dlls/secur32/negotiate.c | 3 +-- dlls/secur32/schannel.c | 22 +++++++++++----------- dlls/secur32/secur32.c | 28 ++++++++++------------------ dlls/secur32/thunks.c | 5 +++-- dlls/secur32/wrapper.c | 3 ++- 6 files changed, 29 insertions(+), 34 deletions(-) diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in index a5aa3b52691..458f62bb99f 100644 --- a/dlls/secur32/Makefile.in +++ b/dlls/secur32/Makefile.in @@ -5,6 +5,8 @@ DELAYIMPORTS = crypt32 EXTRAINCL = $(GNUTLS_CFLAGS) EXTRALIBS = $(SECURITY_LIBS) $(PTHREAD_LIBS) +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ lsa.c \ negotiate.c \ diff --git a/dlls/secur32/negotiate.c b/dlls/secur32/negotiate.c index aeddbccd4f4..6d45d0c5d54 100644 --- a/dlls/secur32/negotiate.c +++ b/dlls/secur32/negotiate.c @@ -23,10 +23,9 @@ #include "sspi.h" #include "rpc.h" #include "wincred.h" -#include "secur32_priv.h" #include "wine/debug.h" -#include "wine/unicode.h" +#include "secur32_priv.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 5f6b96903c4..adbc6a810ed 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -25,15 +25,15 @@ #define NONAMELESSUNION #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "winreg.h" #include "winnls.h" #include "lmcons.h" #include "sspi.h" #include "schannel.h" -#include "secur32_priv.h" -#include "wine/unicode.h" #include "wine/debug.h" +#include "secur32_priv.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); @@ -199,8 +199,8 @@ static void read_config(void) DWORD type, size, value; for(i = 0; i < ARRAY_SIZE(protocol_config_keys); i++) { - strcpyW(subkey_name, protocol_config_keys[i].key_name); - strcatW(subkey_name, clientW); + wcscpy(subkey_name, protocol_config_keys[i].key_name); + wcscat(subkey_name, clientW); res = RegOpenKeyExW(protocols_key, subkey_name, 0, KEY_READ, &key); if(res != ERROR_SUCCESS) { if(protocol_config_keys[i].enabled) @@ -412,8 +412,8 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx) RtlFreeHeap(GetProcessHeap(), 0, str); return NULL; } - strcpyW(ret, rsabaseW); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret + strlenW(ret), len); + wcscpy(ret, rsabaseW); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret + wcslen(ret), len); RtlFreeHeap(GetProcessHeap(), 0, str); } else if (CertGetCertificateContextProperty(ctx, CERT_KEY_PROV_INFO_PROP_ID, NULL, &prov_size)) @@ -425,21 +425,21 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx) return NULL; } if (!(ret = RtlAllocateHeap(GetProcessHeap(), 0, - sizeof(rsabaseW) + strlenW(prov->pwszContainerName) * sizeof(WCHAR)))) + sizeof(rsabaseW) + wcslen(prov->pwszContainerName) * sizeof(WCHAR)))) { RtlFreeHeap(GetProcessHeap(), 0, prov); return NULL; } - strcpyW(ret, rsabaseW); - strcatW(ret, prov->pwszContainerName); + wcscpy(ret, rsabaseW); + wcscat(ret, prov->pwszContainerName); RtlFreeHeap(GetProcessHeap(), 0, prov); } if (!ret && GetUserNameW(username, &len) && (ret = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(rsabaseW) + len * sizeof(WCHAR)))) { - strcpyW(ret, rsabaseW); - strcatW(ret, username); + wcscpy(ret, rsabaseW); + wcscat(ret, username); } return ret; diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 04cb52dbec9..374030d0064 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <assert.h> #include <stdarg.h> @@ -28,7 +29,6 @@ #include "winternl.h" #include "shlwapi.h" #include "sspi.h" -#include "secur32_priv.h" #include "secext.h" #include "ntsecapi.h" #include "thunks.h" @@ -36,7 +36,7 @@ #include "wine/list.h" #include "wine/debug.h" -#include "wine/unicode.h" +#include "secur32_priv.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); @@ -174,18 +174,10 @@ PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(void) return &securityFunctionTableW; } -static PWSTR SECUR32_strdupW(PCWSTR str) +static WCHAR *SECUR32_strdupW(const WCHAR *str) { - PWSTR ret; - - if (str) - { - ret = heap_alloc((lstrlenW(str) + 1) * sizeof(WCHAR)); - if (ret) - lstrcpyW(ret, str); - } - else - ret = NULL; + WCHAR *ret = NULL; + if (str && (ret = heap_alloc((wcslen(str) + 1) * sizeof(WCHAR)))) wcscpy(ret, str); return ret; } @@ -595,7 +587,7 @@ static void SECUR32_initializeProviders(void) ; if (*comma == ',') *comma = '\0'; - for (; *ptr && isspaceW(*ptr) && ptr < securityPkgNames + size; + for (; *ptr && iswspace(*ptr) && ptr < securityPkgNames + size; ptr++) ; if (*ptr) @@ -1046,16 +1038,16 @@ BOOLEAN WINAPI GetComputerObjectNameW( break; } - len = strlenW(cnW) + size + 1 + strlenW(ComputersW) + 1 + strlenW(dcW); + len = wcslen(cnW) + size + 1 + wcslen(ComputersW) + 1 + wcslen(dcW); if (domainInfo->DnsDomainName.Buffer) { - suffix = strrchrW(domainInfo->DnsDomainName.Buffer, '.'); + suffix = wcsrchr(domainInfo->DnsDomainName.Buffer, '.'); if (suffix) { *suffix++ = 0; - len += 1 + strlenW(dcW) + strlenW(suffix); + len += 1 + wcslen(dcW) + wcslen(suffix); } - len += strlenW(domainInfo->DnsDomainName.Buffer); + len += wcslen(domainInfo->DnsDomainName.Buffer); } else suffix = NULL; diff --git a/dlls/secur32/thunks.c b/dlls/secur32/thunks.c index 09b20d54abe..7a59c4ee3ca 100644 --- a/dlls/secur32/thunks.c +++ b/dlls/secur32/thunks.c @@ -17,16 +17,17 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "winnls.h" #include "winternl.h" #include "sspi.h" -#include "secur32_priv.h" -#include "thunks.h" #include "wine/debug.h" +#include "secur32_priv.h" +#include "thunks.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32); diff --git a/dlls/secur32/wrapper.c b/dlls/secur32/wrapper.c index 67c5b5a7215..7e36f293f62 100644 --- a/dlls/secur32/wrapper.c +++ b/dlls/secur32/wrapper.c @@ -16,14 +16,15 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "winnls.h" #include "sspi.h" -#include "secur32_priv.h" #include "wine/debug.h" +#include "secur32_priv.h" WINE_DEFAULT_DEBUG_CHANNEL(secur32);
1
0
0
0
Hans Leidekker : secur32: Move Schannel support to a Unix library.
by Alexandre Julliard
07 May '21
07 May '21
Module: wine Branch: master Commit: 7d0889b7475783b5c68c0e704d69e2140f369ccc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d0889b7475783b5c68c0e70…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri May 7 11:54:41 2021 +0200 secur32: Move Schannel support to a Unix library. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/secur32/schannel.c | 252 +++++++++++++++++++++++--------- dlls/secur32/schannel_gnutls.c | 323 ++++++++++++++++------------------------- dlls/secur32/schannel_macosx.c | 210 ++++++++++++++++----------- dlls/secur32/secur32.c | 3 + dlls/secur32/secur32_priv.h | 81 ++++++----- 5 files changed, 477 insertions(+), 392 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7d0889b7475783b5c68c…
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
77
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
Results per page:
10
25
50
100
200