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
39696138
Commit
39696138
authored
May 02, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Send IME key input from ImeProcessKey.
parent
3b429674
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
56 deletions
+17
-56
ime.c
dlls/winemac.drv/ime.c
+17
-55
ntuser.h
include/ntuser.h
+0
-1
No files found.
dlls/winemac.drv/ime.c
View file @
39696138
...
...
@@ -469,24 +469,6 @@ static void GenerateIMEMessage(HIMC hIMC, UINT msg, WPARAM wParam, LPARAM lParam
UnlockRealIMC
(
hIMC
);
}
static
BOOL
GenerateMessageToTransKey
(
TRANSMSGLIST
*
lpTransBuf
,
UINT
*
uNumTranMsgs
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LPTRANSMSG
ptr
;
if
(
*
uNumTranMsgs
+
1
>=
lpTransBuf
->
uMsgCount
)
return
FALSE
;
ptr
=
lpTransBuf
->
TransMsg
+
*
uNumTranMsgs
;
ptr
->
message
=
msg
;
ptr
->
wParam
=
wParam
;
ptr
->
lParam
=
lParam
;
(
*
uNumTranMsgs
)
++
;
return
TRUE
;
}
static
BOOL
IME_RemoveFromSelected
(
HIMC
hIMC
)
{
int
i
;
...
...
@@ -535,8 +517,14 @@ static void UpdateDataInDefaultIMEWindow(INPUTCONTEXT *lpIMC, HWND hwnd, BOOL sh
BOOL
WINAPI
ImeProcessKey
(
HIMC
hIMC
,
UINT
vKey
,
LPARAM
lKeyData
,
const
LPBYTE
lpbKeyState
)
{
struct
process_text_input_params
params
=
{
.
himc
=
(
UINT_PTR
)
hIMC
,
.
vkey
=
LOWORD
(
vKey
),
.
scan
=
HIWORD
(
lKeyData
),
.
repeat
=
!!
(
lKeyData
>>
30
),
.
key_state
=
lpbKeyState
,
};
LPINPUTCONTEXT
lpIMC
;
BOOL
inIME
;
UINT
ret
;
TRACE
(
"hIMC %p vKey 0x%04x lKeyData 0x%08Ix lpbKeyState %p
\n
"
,
hIMC
,
vKey
,
lKeyData
,
lpbKeyState
);
...
...
@@ -567,14 +555,17 @@ BOOL WINAPI ImeProcessKey(HIMC hIMC, UINT vKey, LPARAM lKeyData, const LPBYTE lp
ImmSetOpenStatus
(
RealIMC
(
FROM_MACDRV
),
FALSE
);
}
myPrivate
->
repeat
=
(
lKeyData
>>
30
)
&
0x1
;
myPrivate
->
bInternalState
=
inIME
;
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
}
UnlockRealIMC
(
hIMC
);
return
inIME
;
if
(
!
inIME
)
return
FALSE
;
TRACE
(
"Processing Mac 0x%04x
\n
"
,
vKey
);
ret
=
MACDRV_CALL
(
ime_process_text_input
,
&
params
);
return
ret
!=
0
;
}
BOOL
WINAPI
ImeSelect
(
HIMC
hIMC
,
BOOL
fSelect
)
...
...
@@ -611,7 +602,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
myPrivate
->
bInternalState
=
FALSE
;
myPrivate
->
textfont
=
NULL
;
myPrivate
->
hwndDefault
=
NULL
;
myPrivate
->
repeat
=
0
;
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
UnlockRealIMC
(
hIMC
);
}
...
...
@@ -622,13 +612,10 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
UINT
WINAPI
ImeToAsciiEx
(
UINT
uVKey
,
UINT
uScanCode
,
const
LPBYTE
lpbKeyState
,
TRANSMSGLIST
*
lpdwTransKey
,
UINT
fuState
,
HIMC
hIMC
)
{
struct
process_text_input_params
params
;
UINT
vkey
;
LPINPUTCONTEXT
lpIMC
;
LPIMEPRIVATE
myPrivate
;
HWND
hwnd
;
UINT
repeat
;
UINT
ret
;
TRACE
(
"uVKey 0x%04x uScanCode 0x%04x fuState %u hIMC %p
\n
"
,
uVKey
,
uScanCode
,
fuState
,
hIMC
);
...
...
@@ -650,41 +637,16 @@ UINT WINAPI ImeToAsciiEx(UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
return
0
;
}
repeat
=
myPrivate
->
repeat
;
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
UnlockRealIMC
(
hIMC
);
TRACE
(
"Processing Mac 0x%04x
\n
"
,
vkey
);
params
.
himc
=
HandleToULong
(
hIMC
);
params
.
vkey
=
uVKey
;
params
.
scan
=
uScanCode
;
params
.
repeat
=
repeat
;
params
.
key_state
=
lpbKeyState
;
ret
=
MACDRV_CALL
(
ime_process_text_input
,
&
params
);
if
(
!
ret
)
{
UINT
msgs
=
0
;
UINT
msg
=
(
uScanCode
&
0x8000
)
?
WM_KEYUP
:
WM_KEYDOWN
;
/* KeyStroke not processed by the IME
* so we need to rebuild the KeyDown message and pass it on to WINE
*/
if
(
!
GenerateMessageToTransKey
(
lpdwTransKey
,
&
msgs
,
msg
,
vkey
,
MAKELONG
(
0x0001
,
uScanCode
)))
GenerateIMEMessage
(
hIMC
,
msg
,
vkey
,
MAKELONG
(
0x0001
,
uScanCode
));
/* trigger the pending client_func_ime_set_text call */
MACDRV_CALL
(
ime_get_text_input
,
NULL
);
return
msgs
;
}
else
if
((
lpIMC
=
LockRealIMC
(
hIMC
)))
{
/* trigger the pending client_func_ime_set_text call */
MACDRV_CALL
(
ime_get_text_input
,
NULL
);
if
((
lpIMC
=
LockRealIMC
(
hIMC
)))
{
UpdateDataInDefaultIMEWindow
(
lpIMC
,
hwnd
,
FALSE
);
UnlockRealIMC
(
hIMC
);
}
UpdateDataInDefaultIMEWindow
(
lpIMC
,
hwnd
,
FALSE
);
UnlockRealIMC
(
hIMC
);
}
return
0
;
}
...
...
include/ntuser.h
View file @
39696138
...
...
@@ -497,7 +497,6 @@ typedef struct ime_private
BOOL
bInternalState
;
HFONT
textfont
;
HWND
hwndDefault
;
UINT
repeat
;
}
IMEPRIVATE
,
*
LPIMEPRIVATE
;
#define WM_SYSTIMER 0x0118
...
...
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