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
51f414bd
Commit
51f414bd
authored
Jul 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Select default IME when creating its data.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53348
parent
c850336c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
30 deletions
+25
-30
imm.c
dlls/imm32/imm.c
+25
-30
No files found.
dlls/imm32/imm.c
View file @
51f414bd
...
...
@@ -806,7 +806,7 @@ BOOL WINAPI ImmConfigureIMEW(
return
FALSE
;
}
static
InputContextData
*
alloc_input_context_data
(
void
)
static
InputContextData
*
create_input_context
(
HIMC
default_imc
)
{
InputContextData
*
new_context
;
LPGUIDELINE
gl
;
...
...
@@ -816,6 +816,7 @@ static InputContextData *alloc_input_context_data(void)
new_context
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
InputContextData
));
/* Load the IME */
new_context
->
threadDefault
=
!!
default_imc
;
new_context
->
immKbd
=
IMM_GetImmHkl
(
GetKeyboardLayout
(
0
));
if
(
!
new_context
->
immKbd
->
hIME
)
...
...
@@ -848,6 +849,27 @@ static InputContextData *alloc_input_context_data(void)
new_context
->
IMC
.
fdwConversion
=
new_context
->
immKbd
->
imeInfo
.
fdwConversionCaps
;
new_context
->
IMC
.
fdwSentence
=
new_context
->
immKbd
->
imeInfo
.
fdwSentenceCaps
;
if
(
!
default_imc
)
new_context
->
handle
=
NtUserCreateInputContext
((
UINT_PTR
)
new_context
);
else
if
(
NtUserUpdateInputContext
(
default_imc
,
NtUserInputContextClientPtr
,
(
UINT_PTR
)
new_context
))
new_context
->
handle
=
default_imc
;
if
(
!
new_context
->
handle
)
{
free_input_context_data
(
new_context
);
return
0
;
}
if
(
!
new_context
->
immKbd
->
pImeSelect
(
new_context
->
handle
,
TRUE
))
{
TRACE
(
"Selection of IME failed
\n
"
);
IMM_DestroyContext
(
new_context
);
return
0
;
}
new_context
->
threadID
=
GetCurrentThreadId
();
SendMessageW
(
GetFocus
(),
WM_IME_SELECT
,
TRUE
,
(
LPARAM
)
new_context
->
immKbd
);
new_context
->
immKbd
->
uSelected
++
;
TRACE
(
"Created context %p
\n
"
,
new_context
);
return
new_context
;
}
...
...
@@ -856,16 +878,7 @@ static InputContextData* get_imc_data(HIMC handle)
InputContextData
*
ret
;
if
((
ret
=
query_imc_data
(
handle
))
||
!
handle
)
return
ret
;
if
(
!
(
ret
=
alloc_input_context_data
()))
return
NULL
;
ret
->
threadID
=
NtUserQueryInputContext
(
handle
,
NtUserInputContextThreadId
);
ret
->
handle
=
handle
;
ret
->
threadDefault
=
TRUE
;
if
(
!
NtUserUpdateInputContext
(
handle
,
NtUserInputContextClientPtr
,
(
UINT_PTR
)
ret
))
{
free_input_context_data
(
ret
);
return
NULL
;
}
return
ret
;
return
create_input_context
(
handle
);
}
/***********************************************************************
...
...
@@ -875,25 +888,7 @@ HIMC WINAPI ImmCreateContext(void)
{
InputContextData
*
new_context
;
if
(
!
(
new_context
=
alloc_input_context_data
()))
return
0
;
if
(
!
(
new_context
->
handle
=
NtUserCreateInputContext
((
UINT_PTR
)
new_context
)))
{
free_input_context_data
(
new_context
);
return
0
;
}
if
(
!
new_context
->
immKbd
->
pImeSelect
(
new_context
->
handle
,
TRUE
))
{
TRACE
(
"Selection of IME failed
\n
"
);
IMM_DestroyContext
(
new_context
);
return
0
;
}
new_context
->
threadID
=
GetCurrentThreadId
();
SendMessageW
(
GetFocus
(),
WM_IME_SELECT
,
TRUE
,
(
LPARAM
)
new_context
->
immKbd
);
new_context
->
immKbd
->
uSelected
++
;
TRACE
(
"Created context %p
\n
"
,
new_context
);
if
(
!
(
new_context
=
create_input_context
(
0
)))
return
0
;
return
new_context
->
handle
;
}
...
...
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