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
266c1101
Commit
266c1101
authored
Oct 15, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Exit on invalid window in ImmAssociateContext.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
80ac0b9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
24 deletions
+21
-24
imm.c
dlls/imm32/imm.c
+21
-24
No files found.
dlls/imm32/imm.c
View file @
266c1101
...
...
@@ -583,12 +583,13 @@ BOOL WINAPI ImmSetActiveContext(HWND hwnd, HIMC himc, BOOL activate)
*/
HIMC
WINAPI
ImmAssociateContext
(
HWND
hWnd
,
HIMC
hIMC
)
{
HIMC
old
=
NULL
;
InputContextData
*
data
=
get_imc_data
(
hIMC
);
HIMC
defaultContext
;
HIMC
old
;
TRACE
(
"(%p, %p):
\n
"
,
hWnd
,
hIMC
);
if
(
hIMC
&&
!
data
)
if
(
!
IsWindow
(
hWnd
)
||
(
hIMC
&&
!
data
)
)
return
NULL
;
/*
...
...
@@ -600,30 +601,26 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
if
(
hIMC
&&
IMM_IsCrossThreadAccess
(
hWnd
,
hIMC
))
return
NULL
;
if
(
hWnd
)
{
HIMC
defaultContext
=
get_default_context
(
hWnd
);
old
=
RemovePropW
(
hWnd
,
szwWineIMCProperty
);
defaultContext
=
get_default_context
(
hWnd
);
old
=
RemovePropW
(
hWnd
,
szwWineIMCProperty
);
if
(
old
==
NULL
)
old
=
defaultContext
;
else
if
(
old
==
(
HIMC
)
-
1
)
old
=
NULL
;
if
(
old
==
NULL
)
old
=
defaultContext
;
else
if
(
old
==
(
HIMC
)
-
1
)
old
=
NULL
;
if
(
hIMC
!=
defaultContext
)
{
if
(
hIMC
==
NULL
)
/* Meaning disable imm for that window*/
SetPropW
(
hWnd
,
szwWineIMCProperty
,(
HANDLE
)
-
1
);
else
SetPropW
(
hWnd
,
szwWineIMCProperty
,
hIMC
);
}
if
(
hIMC
!=
defaultContext
)
{
if
(
hIMC
==
NULL
)
/* Meaning disable imm for that window*/
SetPropW
(
hWnd
,
szwWineIMCProperty
,
(
HANDLE
)
-
1
);
else
SetPropW
(
hWnd
,
szwWineIMCProperty
,
hIMC
);
}
if
(
old
)
{
InputContextData
*
old_data
=
old
;
if
(
old_data
->
IMC
.
hWnd
==
hWnd
)
old_data
->
IMC
.
hWnd
=
NULL
;
}
if
(
old
)
{
InputContextData
*
old_data
=
old
;
if
(
old_data
->
IMC
.
hWnd
==
hWnd
)
old_data
->
IMC
.
hWnd
=
NULL
;
}
if
(
!
hIMC
)
...
...
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