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
5c779bfa
Commit
5c779bfa
authored
Dec 17, 2008
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove the driver call for GetKeyboardLayoutList and instead populate from the registry.
parent
b3d308b9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
52 deletions
+55
-52
driver.c
dlls/user32/driver.c
+0
-13
input.c
dlls/user32/input.c
+55
-1
user_private.h
dlls/user32/user_private.h
+0
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+0
-36
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-1
No files found.
dlls/user32/driver.c
View file @
5c779bfa
...
...
@@ -77,7 +77,6 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
GetAsyncKeyState
);
GET_USER_FUNC
(
GetKeyNameText
);
GET_USER_FUNC
(
GetKeyboardLayout
);
GET_USER_FUNC
(
GetKeyboardLayoutList
);
GET_USER_FUNC
(
GetKeyboardLayoutName
);
GET_USER_FUNC
(
LoadKeyboardLayout
);
GET_USER_FUNC
(
MapVirtualKeyEx
);
...
...
@@ -177,11 +176,6 @@ static HKL nulldrv_GetKeyboardLayout( DWORD layout )
return
0
;
}
static
UINT
nulldrv_GetKeyboardLayoutList
(
INT
count
,
HKL
*
layouts
)
{
return
0
;
}
static
BOOL
nulldrv_GetKeyboardLayoutName
(
LPWSTR
name
)
{
return
FALSE
;
...
...
@@ -436,7 +430,6 @@ static USER_DRIVER null_driver =
nulldrv_GetAsyncKeyState
,
nulldrv_GetKeyNameText
,
nulldrv_GetKeyboardLayout
,
nulldrv_GetKeyboardLayoutList
,
nulldrv_GetKeyboardLayoutName
,
nulldrv_LoadKeyboardLayout
,
nulldrv_MapVirtualKeyEx
,
...
...
@@ -524,11 +517,6 @@ static HKL loaderdrv_GetKeyboardLayout( DWORD layout )
return
load_driver
()
->
pGetKeyboardLayout
(
layout
);
}
static
UINT
loaderdrv_GetKeyboardLayoutList
(
INT
count
,
HKL
*
layouts
)
{
return
load_driver
()
->
pGetKeyboardLayoutList
(
count
,
layouts
);
}
static
BOOL
loaderdrv_GetKeyboardLayoutName
(
LPWSTR
name
)
{
return
load_driver
()
->
pGetKeyboardLayoutName
(
name
);
...
...
@@ -783,7 +771,6 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_GetAsyncKeyState
,
loaderdrv_GetKeyNameText
,
loaderdrv_GetKeyboardLayout
,
loaderdrv_GetKeyboardLayoutList
,
loaderdrv_GetKeyboardLayoutName
,
loaderdrv_LoadKeyboardLayout
,
loaderdrv_MapVirtualKeyEx
,
...
...
dlls/user32/input.c
View file @
5c779bfa
...
...
@@ -45,6 +45,7 @@
#include "user_private.h"
#include "wine/server.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
win
);
WINE_DECLARE_DEBUG_CHANNEL
(
keyboard
);
...
...
@@ -800,9 +801,62 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
*/
UINT
WINAPI
GetKeyboardLayoutList
(
INT
nBuff
,
HKL
*
layouts
)
{
HKEY
hKeyKeyboard
;
DWORD
rc
;
INT
count
=
0
;
ULONG_PTR
baselayout
;
LANGID
langid
;
static
const
WCHAR
szKeyboardReg
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
' '
,
'L'
,
'a'
,
'y'
,
'o'
,
'u'
,
't'
,
's'
,
0
};
TRACE_
(
keyboard
)(
"(%d,%p)
\n
"
,
nBuff
,
layouts
);
return
USER_Driver
->
pGetKeyboardLayoutList
(
nBuff
,
layouts
);
baselayout
=
GetUserDefaultLCID
();
langid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
baselayout
));
if
(
langid
==
LANG_CHINESE
||
langid
==
LANG_JAPANESE
||
langid
==
LANG_KOREAN
)
baselayout
|=
0xe001
<<
16
;
/* IME */
else
baselayout
|=
baselayout
<<
16
;
/* Enumerate the Registry */
rc
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
szKeyboardReg
,
&
hKeyKeyboard
);
if
(
rc
==
ERROR_SUCCESS
)
{
do
{
WCHAR
szKeyName
[
9
];
HKL
layout
;
rc
=
RegEnumKeyW
(
hKeyKeyboard
,
count
,
szKeyName
,
9
);
if
(
rc
==
ERROR_SUCCESS
)
{
layout
=
(
HKL
)
strtoulW
(
szKeyName
,
NULL
,
16
);
if
(
baselayout
!=
0
&&
layout
==
(
HKL
)
baselayout
)
baselayout
=
0
;
/* found in the registry do not add again */
if
(
nBuff
&&
layouts
)
{
if
(
count
>=
nBuff
)
break
;
layouts
[
count
]
=
layout
;
}
count
++
;
}
}
while
(
rc
==
ERROR_SUCCESS
);
RegCloseKey
(
hKeyKeyboard
);
}
/* make sure our base layout is on the list */
if
(
baselayout
!=
0
)
{
if
(
nBuff
&&
layouts
)
{
if
(
count
<
nBuff
)
{
layouts
[
count
]
=
(
HKL
)
baselayout
;
count
++
;
}
}
else
count
++
;
}
return
count
;
}
...
...
dlls/user32/user_private.h
View file @
5c779bfa
...
...
@@ -109,7 +109,6 @@ typedef struct tagUSER_DRIVER {
SHORT
(
*
pGetAsyncKeyState
)(
INT
);
INT
(
*
pGetKeyNameText
)(
LONG
,
LPWSTR
,
INT
);
HKL
(
*
pGetKeyboardLayout
)(
DWORD
);
UINT
(
*
pGetKeyboardLayoutList
)(
INT
,
HKL
*
);
BOOL
(
*
pGetKeyboardLayoutName
)(
LPWSTR
);
HKL
(
*
pLoadKeyboardLayout
)(
LPCWSTR
,
UINT
);
UINT
(
*
pMapVirtualKeyEx
)(
UINT
,
UINT
,
HKL
);
...
...
dlls/winex11.drv/keyboard.c
View file @
5c779bfa
...
...
@@ -1903,42 +1903,6 @@ SHORT X11DRV_GetAsyncKeyState(INT key)
/***********************************************************************
* GetKeyboardLayoutList (X11DRV.@)
*/
UINT
X11DRV_GetKeyboardLayoutList
(
INT
size
,
HKL
*
hkl
)
{
INT
i
;
TRACE
(
"%d, %p
\n
"
,
size
,
hkl
);
if
(
!
size
)
{
size
=
4096
;
/* hope we will never have that many */
hkl
=
NULL
;
}
for
(
i
=
0
;
main_key_tab
[
i
].
comment
&&
(
i
<
size
);
i
++
)
{
if
(
hkl
)
{
ULONG_PTR
layout
=
main_key_tab
[
i
].
lcid
;
LANGID
langid
;
/* see comment for GetKeyboardLayout */
langid
=
PRIMARYLANGID
(
LANGIDFROMLCID
(
layout
));
if
(
langid
==
LANG_CHINESE
||
langid
==
LANG_JAPANESE
||
langid
==
LANG_KOREAN
)
layout
|=
0xe001
<<
16
;
/* FIXME */
else
layout
|=
layout
<<
16
;
hkl
[
i
]
=
(
HKL
)
layout
;
}
}
return
i
;
}
/***********************************************************************
* GetKeyboardLayout (X11DRV.@)
*/
HKL
X11DRV_GetKeyboardLayout
(
DWORD
dwThreadid
)
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
5c779bfa
...
...
@@ -69,7 +69,6 @@
@ cdecl GetAsyncKeyState(long) X11DRV_GetAsyncKeyState
@ cdecl GetKeyNameText(long ptr long) X11DRV_GetKeyNameText
@ cdecl GetKeyboardLayout(long) X11DRV_GetKeyboardLayout
@ cdecl GetKeyboardLayoutList(long ptr) X11DRV_GetKeyboardLayoutList
@ cdecl GetKeyboardLayoutName(ptr) X11DRV_GetKeyboardLayoutName
@ cdecl LoadKeyboardLayout(wstr long) X11DRV_LoadKeyboardLayout
@ cdecl MapVirtualKeyEx(long long long) X11DRV_MapVirtualKeyEx
...
...
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