Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
27c5abe3
Commit
27c5abe3
authored
Mar 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Keep the current user locale when loading layout.
parent
d12dda39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
input.c
dlls/user32/input.c
+7
-2
No files found.
dlls/user32/input.c
View file @
27c5abe3
...
@@ -439,7 +439,8 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
...
@@ -439,7 +439,8 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
HKL
WINAPI
LoadKeyboardLayoutW
(
const
WCHAR
*
name
,
UINT
flags
)
HKL
WINAPI
LoadKeyboardLayoutW
(
const
WCHAR
*
name
,
UINT
flags
)
{
{
WCHAR
layout_path
[
MAX_PATH
],
value
[
5
];
WCHAR
layout_path
[
MAX_PATH
],
value
[
5
];
DWORD
value_size
,
tmp
;
LCID
locale
=
GetUserDefaultLCID
();
DWORD
id
,
value_size
,
tmp
;
HKEY
hkey
;
HKEY
hkey
;
HKL
layout
;
HKL
layout
;
...
@@ -449,6 +450,9 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags )
...
@@ -449,6 +450,9 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags )
if
(
HIWORD
(
tmp
))
layout
=
UlongToHandle
(
tmp
);
if
(
HIWORD
(
tmp
))
layout
=
UlongToHandle
(
tmp
);
else
layout
=
UlongToHandle
(
MAKELONG
(
LOWORD
(
tmp
),
LOWORD
(
tmp
)
)
);
else
layout
=
UlongToHandle
(
MAKELONG
(
LOWORD
(
tmp
),
LOWORD
(
tmp
)
)
);
if
(
!
((
UINT_PTR
)
layout
>>
28
))
id
=
LOWORD
(
tmp
);
else
id
=
HIWORD
(
layout
);
/* IME or aliased layout */
wcscpy
(
layout_path
,
L"System
\\
CurrentControlSet
\\
Control
\\
Keyboard Layouts
\\
"
);
wcscpy
(
layout_path
,
L"System
\\
CurrentControlSet
\\
Control
\\
Keyboard Layouts
\\
"
);
wcscat
(
layout_path
,
name
);
wcscat
(
layout_path
,
name
);
...
@@ -456,11 +460,12 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags )
...
@@ -456,11 +460,12 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags )
{
{
value_size
=
sizeof
(
value
);
value_size
=
sizeof
(
value
);
if
(
!
RegGetValueW
(
hkey
,
NULL
,
L"Layout Id"
,
RRF_RT_REG_SZ
,
NULL
,
(
void
*
)
&
value
,
&
value_size
))
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
)
)
);
id
=
0xf000
|
(
wcstoul
(
value
,
NULL
,
16
)
&
0xfff
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
}
}
layout
=
UlongToHandle
(
MAKELONG
(
locale
,
id
)
);
if
((
flags
&
KLF_ACTIVATE
)
&&
NtUserActivateKeyboardLayout
(
layout
,
0
))
return
layout
;
if
((
flags
&
KLF_ACTIVATE
)
&&
NtUserActivateKeyboardLayout
(
layout
,
0
))
return
layout
;
/* FIXME: semi-stub: returning default layout */
/* FIXME: semi-stub: returning default layout */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment