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
9c8b3e6f
Commit
9c8b3e6f
authored
Mar 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Introduce a new imc_select_hkl helper.
parent
0aa3b85b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
imm.c
dlls/imm32/imm.c
+19
-14
No files found.
dlls/imm32/imm.c
View file @
9c8b3e6f
...
...
@@ -564,6 +564,23 @@ static void ime_release( struct ime *ime )
LeaveCriticalSection
(
&
ime_cs
);
}
static
void
imc_select_hkl
(
struct
imc
*
imc
,
HKL
hkl
)
{
if
(
imc
->
ime
)
{
if
(
imc
->
ime
->
hkl
==
hkl
)
return
;
imc
->
ime
->
pImeSelect
(
imc
->
handle
,
FALSE
);
ime_release
(
imc
->
ime
);
}
if
(
!
hkl
)
imc
->
ime
=
NULL
;
else
if
(
!
(
imc
->
ime
=
ime_acquire
(
hkl
)))
WARN
(
"Failed to acquire IME for HKL %p
\n
"
,
hkl
);
else
imc
->
ime
->
pImeSelect
(
imc
->
handle
,
TRUE
);
}
static
BOOL
CALLBACK
enum_activate_layout
(
HIMC
himc
,
LPARAM
lparam
)
{
if
(
ImmLockIMC
(
himc
))
ImmUnlockIMC
(
himc
);
...
...
@@ -3026,20 +3043,8 @@ BOOL WINAPI ImmProcessKey(HWND hwnd, HKL hKL, UINT vKey, LPARAM lKeyData, DWORD
TRACE
(
"%p %p %x %x %lx
\n
"
,
hwnd
,
hKL
,
vKey
,
(
UINT
)
lKeyData
,
unknown
);
if
(
!
(
data
=
get_imc_data
(
imc
)))
return
FALSE
;
/* Make sure we are inputting to the correct keyboard */
if
(
data
->
ime
->
hkl
!=
hKL
)
{
struct
ime
*
new_hkl
;
if
(
!
(
new_hkl
=
ime_acquire
(
hKL
)))
return
FALSE
;
data
->
ime
->
pImeSelect
(
imc
,
FALSE
);
ime_release
(
data
->
ime
);
data
->
ime
=
new_hkl
;
data
->
ime
->
pImeSelect
(
imc
,
TRUE
);
}
imc_select_hkl
(
data
,
hKL
);
if
(
!
data
->
ime
)
return
FALSE
;
GetKeyboardState
(
state
);
if
(
data
->
ime
->
pImeProcessKey
(
imc
,
vKey
,
lKeyData
,
state
))
...
...
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