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
1cd71e92
Commit
1cd71e92
authored
Apr 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Use INPUTCONTEXT directly in ImmSetConversionStatus.
parent
67ddc314
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
imm.c
dlls/imm32/imm.c
+19
-22
imm32.c
dlls/imm32/tests/imm32.c
+0
-1
No files found.
dlls/imm32/imm.c
View file @
1cd71e92
...
...
@@ -2635,37 +2635,34 @@ BOOL WINAPI ImmSetCompositionWindow(
/***********************************************************************
* ImmSetConversionStatus (IMM32.@)
*/
BOOL
WINAPI
ImmSetConversionStatus
(
HIMC
hIMC
,
DWORD
fdwConversion
,
DWORD
fdwSentence
)
BOOL
WINAPI
ImmSetConversionStatus
(
HIMC
himc
,
DWORD
conversion
,
DWORD
sentence
)
{
DWORD
oldConversion
,
oldSentence
;
struct
imc
*
data
=
get_imc_data
(
hIMC
);
TRACE
(
"%p %ld %ld
\n
"
,
hIMC
,
fdwConversion
,
fdwSentence
);
DWORD
old_conversion
,
old_sentence
;
INPUTCONTEXT
*
ctx
;
if
(
!
data
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
TRACE
(
"himc %p, conversion %#lx, sentence %#lx
\n
"
,
himc
,
conversion
,
sentence
);
if
(
NtUserQueryInputContext
(
hIMC
,
NtUserInputContextThreadId
)
!=
GetCurrentThreadId
())
return
FALSE
;
if
(
NtUserQueryInputContext
(
himc
,
NtUserInputContextThreadId
)
!=
GetCurrentThreadId
())
return
FALSE
;
if
(
!
(
ctx
=
ImmLockIMC
(
himc
)))
return
FALSE
;
if
(
fdwConversion
!=
data
->
IMC
.
fdwConversion
)
if
(
conversion
!=
ctx
->
fdwConversion
)
{
old
Conversion
=
data
->
IMC
.
fdwConversion
;
data
->
IMC
.
fdwConversion
=
fdwC
onversion
;
ImmNotifyIME
(
hIMC
,
NI_CONTEXTUPDATED
,
oldConversion
,
IMC_SETCONVERSIONMODE
);
imc_notify_ime
(
data
,
IMN_SETCONVERSIONMODE
,
0
);
old
_conversion
=
ctx
->
fdwConversion
;
ctx
->
fdwConversion
=
c
onversion
;
ImmNotifyIME
(
himc
,
NI_CONTEXTUPDATED
,
old_conversion
,
IMC_SETCONVERSIONMODE
);
SendMessageW
(
ctx
->
hWnd
,
WM_IME_NOTIFY
,
IMN_SETCONVERSIONMODE
,
0
);
}
if
(
fdwSentence
!=
data
->
IMC
.
fdwSentence
)
if
(
sentence
!=
ctx
->
fdwSentence
)
{
old
Sentence
=
data
->
IMC
.
fdwSentence
;
data
->
IMC
.
fdwSentence
=
fdwS
entence
;
ImmNotifyIME
(
hIMC
,
NI_CONTEXTUPDATED
,
oldSentence
,
IMC_SETSENTENCEMODE
);
imc_notify_ime
(
data
,
IMN_SETSENTENCEMODE
,
0
);
old
_sentence
=
ctx
->
fdwSentence
;
ctx
->
fdwSentence
=
s
entence
;
ImmNotifyIME
(
himc
,
NI_CONTEXTUPDATED
,
old_sentence
,
IMC_SETSENTENCEMODE
);
SendMessageW
(
ctx
->
hWnd
,
WM_IME_NOTIFY
,
IMN_SETSENTENCEMODE
,
0
);
}
ImmUnlockIMC
(
himc
);
return
TRUE
;
}
...
...
dlls/imm32/tests/imm32.c
View file @
1cd71e92
...
...
@@ -4219,7 +4219,6 @@ static void test_ImmSetConversionStatus(void)
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0xdeadbeef
,
.
value
=
IMC_SETCONVERSIONMODE
},
},
{.
todo
=
TRUE
},
/* spurious calls */
{
0
},
};
const
struct
ime_call
set_conversion_status_2_seq
[]
=
...
...
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