Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
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
Hide 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(
...
@@ -2635,37 +2635,34 @@ BOOL WINAPI ImmSetCompositionWindow(
/***********************************************************************
/***********************************************************************
* ImmSetConversionStatus (IMM32.@)
* ImmSetConversionStatus (IMM32.@)
*/
*/
BOOL
WINAPI
ImmSetConversionStatus
(
BOOL
WINAPI
ImmSetConversionStatus
(
HIMC
himc
,
DWORD
conversion
,
DWORD
sentence
)
HIMC
hIMC
,
DWORD
fdwConversion
,
DWORD
fdwSentence
)
{
{
DWORD
oldConversion
,
oldSentence
;
DWORD
old_conversion
,
old_sentence
;
struct
imc
*
data
=
get_imc_data
(
hIMC
);
INPUTCONTEXT
*
ctx
;
TRACE
(
"%p %ld %ld
\n
"
,
hIMC
,
fdwConversion
,
fdwSentence
);
if
(
!
data
)
TRACE
(
"himc %p, conversion %#lx, sentence %#lx
\n
"
,
himc
,
conversion
,
sentence
);
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
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
;
old
_conversion
=
ctx
->
fdwConversion
;
data
->
IMC
.
fdwConversion
=
fdwC
onversion
;
ctx
->
fdwConversion
=
c
onversion
;
ImmNotifyIME
(
hIMC
,
NI_CONTEXTUPDATED
,
oldConversion
,
IMC_SETCONVERSIONMODE
);
ImmNotifyIME
(
himc
,
NI_CONTEXTUPDATED
,
old_conversion
,
IMC_SETCONVERSIONMODE
);
imc_notify_ime
(
data
,
IMN_SETCONVERSIONMODE
,
0
);
SendMessageW
(
ctx
->
hWnd
,
WM_IME_NOTIFY
,
IMN_SETCONVERSIONMODE
,
0
);
}
}
if
(
fdwSentence
!=
data
->
IMC
.
fdwSentence
)
if
(
sentence
!=
ctx
->
fdwSentence
)
{
{
old
Sentence
=
data
->
IMC
.
fdwSentence
;
old
_sentence
=
ctx
->
fdwSentence
;
data
->
IMC
.
fdwSentence
=
fdwS
entence
;
ctx
->
fdwSentence
=
s
entence
;
ImmNotifyIME
(
hIMC
,
NI_CONTEXTUPDATED
,
oldSentence
,
IMC_SETSENTENCEMODE
);
ImmNotifyIME
(
himc
,
NI_CONTEXTUPDATED
,
old_sentence
,
IMC_SETSENTENCEMODE
);
imc_notify_ime
(
data
,
IMN_SETSENTENCEMODE
,
0
);
SendMessageW
(
ctx
->
hWnd
,
WM_IME_NOTIFY
,
IMN_SETSENTENCEMODE
,
0
);
}
}
ImmUnlockIMC
(
himc
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/imm32/tests/imm32.c
View file @
1cd71e92
...
@@ -4219,7 +4219,6 @@ static void test_ImmSetConversionStatus(void)
...
@@ -4219,7 +4219,6 @@ static void test_ImmSetConversionStatus(void)
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
hkl
=
expect_ime
,
.
himc
=
default_himc
,
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0xdeadbeef
,
.
value
=
IMC_SETCONVERSIONMODE
},
.
func
=
IME_NOTIFY
,
.
notify
=
{.
action
=
NI_CONTEXTUPDATED
,
.
index
=
0xdeadbeef
,
.
value
=
IMC_SETCONVERSIONMODE
},
},
},
{.
todo
=
TRUE
},
/* spurious calls */
{
0
},
{
0
},
};
};
const
struct
ime_call
set_conversion_status_2_seq
[]
=
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