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
cbf719d7
Commit
cbf719d7
authored
Apr 01, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove now unnecessary selected HIMC tracking code.
parent
9f05a79b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
79 deletions
+3
-79
ime.c
dlls/winex11.drv/ime.c
+3
-79
No files found.
dlls/winex11.drv/ime.c
View file @
cbf719d7
...
...
@@ -47,91 +47,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
imm
);
#define FROM_X11 ((HIMC)0xcafe1337)
static
HIMC
*
hSelectedFrom
=
NULL
;
static
INT
hSelectedCount
=
0
;
static
HIMC
RealIMC
(
HIMC
hIMC
)
{
if
(
hIMC
==
FROM_X11
)
{
INT
i
;
HWND
wnd
=
GetFocus
();
HIMC
winHimc
=
ImmGetContext
(
wnd
);
for
(
i
=
0
;
i
<
hSelectedCount
;
i
++
)
if
(
winHimc
==
hSelectedFrom
[
i
])
return
winHimc
;
return
NULL
;
}
else
return
hIMC
;
}
static
LPINPUTCONTEXT
LockRealIMC
(
HIMC
hIMC
)
{
HIMC
real_imc
=
RealIMC
(
hIMC
);
if
(
real_imc
)
return
ImmLockIMC
(
real_imc
);
else
return
NULL
;
}
static
BOOL
UnlockRealIMC
(
HIMC
hIMC
)
{
HIMC
real_imc
=
RealIMC
(
hIMC
);
if
(
real_imc
)
return
ImmUnlockIMC
(
real_imc
);
else
return
FALSE
;
}
static
BOOL
IME_RemoveFromSelected
(
HIMC
hIMC
)
{
int
i
;
for
(
i
=
0
;
i
<
hSelectedCount
;
i
++
)
if
(
hSelectedFrom
[
i
]
==
hIMC
)
{
if
(
i
<
hSelectedCount
-
1
)
memmove
(
&
hSelectedFrom
[
i
],
&
hSelectedFrom
[
i
+
1
],
(
hSelectedCount
-
i
-
1
)
*
sizeof
(
HIMC
));
hSelectedCount
--
;
return
TRUE
;
}
return
FALSE
;
}
static
void
IME_AddToSelected
(
HIMC
hIMC
)
{
hSelectedCount
++
;
if
(
hSelectedFrom
)
hSelectedFrom
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
hSelectedFrom
,
hSelectedCount
*
sizeof
(
HIMC
));
else
hSelectedFrom
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HIMC
));
hSelectedFrom
[
hSelectedCount
-
1
]
=
hIMC
;
}
BOOL
WINAPI
ImeSelect
(
HIMC
hIMC
,
BOOL
fSelect
)
{
LPINPUTCONTEXT
lpIMC
;
TRACE
(
"%p %s
\n
"
,
hIMC
,(
fSelect
)
?
"TRUE"
:
"FALSE"
);
if
(
hIMC
==
FROM_X11
)
{
ERR
(
"ImeSelect should never be called from X11
\n
"
);
return
FALSE
;
}
if
(
!
hIMC
)
return
TRUE
;
/* not selected */
if
(
!
fSelect
)
return
IME_RemoveFromSelected
(
hIMC
);
IME_AddToSelected
(
hIMC
);
if
(
!
hIMC
||
!
fSelect
)
return
TRUE
;
/* Initialize our structures */
lpIMC
=
LockReal
IMC
(
hIMC
);
lpIMC
=
ImmLock
IMC
(
hIMC
);
if
(
lpIMC
!=
NULL
)
{
LPIMEPRIVATE
myPrivate
;
...
...
@@ -141,7 +65,7 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
myPrivate
->
textfont
=
NULL
;
myPrivate
->
hwndDefault
=
NULL
;
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
UnlockReal
IMC
(
hIMC
);
ImmUnlock
IMC
(
hIMC
);
}
return
TRUE
;
...
...
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