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
4071f49f
Commit
4071f49f
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: Delay ime_set_text until ImeToAsciiEx requests it.
parent
80060f21
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
5 deletions
+58
-5
event.c
dlls/winemac.drv/event.c
+45
-2
ime.c
dlls/winemac.drv/ime.c
+9
-3
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-0
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+2
-0
unixlib.h
dlls/winemac.drv/unixlib.h
+1
-0
No files found.
dlls/winemac.drv/event.c
View file @
4071f49f
...
...
@@ -32,6 +32,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
event
);
WINE_DECLARE_DEBUG_CHANNEL
(
imm
);
struct
ime_update
{
struct
ime_set_text_params
*
comp_params
;
DWORD
comp_size
;
struct
ime_set_text_params
*
result_params
;
DWORD
result_size
;
};
static
struct
ime_update
ime_update
;
/* return the name of an Mac event */
static
const
char
*
dbgstr_event
(
int
type
)
...
...
@@ -170,7 +178,20 @@ static void macdrv_im_set_text(const macdrv_event *event)
if
(
length
)
CFStringGetCharacters
(
event
->
im_set_text
.
text
,
CFRangeMake
(
0
,
length
),
params
->
text
);
macdrv_client_func
(
client_func_ime_set_text
,
params
,
size
);
free
(
ime_update
.
comp_params
);
ime_update
.
comp_params
=
NULL
;
if
(
params
->
complete
)
{
free
(
ime_update
.
result_params
);
ime_update
.
result_params
=
params
;
ime_update
.
result_size
=
size
;
}
else
{
ime_update
.
comp_params
=
params
;
ime_update
.
comp_size
=
size
;
}
}
/***********************************************************************
...
...
@@ -179,7 +200,29 @@ static void macdrv_im_set_text(const macdrv_event *event)
static
void
macdrv_sent_text_input
(
const
macdrv_event
*
event
)
{
TRACE_
(
imm
)(
"handled: %s
\n
"
,
event
->
sent_text_input
.
handled
?
"TRUE"
:
"FALSE"
);
*
event
->
sent_text_input
.
done
=
event
->
sent_text_input
.
handled
?
1
:
-
1
;
*
event
->
sent_text_input
.
done
=
event
->
sent_text_input
.
handled
||
ime_update
.
result_params
?
1
:
-
1
;
}
/***********************************************************************
* macdrv_ime_get_text_input
*/
NTSTATUS
macdrv_ime_get_text_input
(
void
*
arg
)
{
if
(
ime_update
.
result_params
)
{
macdrv_client_func
(
client_func_ime_set_text
,
ime_update
.
result_params
,
ime_update
.
result_size
);
free
(
ime_update
.
result_params
);
ime_update
.
result_params
=
NULL
;
}
if
(
ime_update
.
comp_params
)
{
macdrv_client_func
(
client_func_ime_set_text
,
ime_update
.
comp_params
,
ime_update
.
comp_size
);
free
(
ime_update
.
comp_params
);
ime_update
.
comp_params
=
NULL
;
}
return
0
;
}
...
...
dlls/winemac.drv/ime.c
View file @
4071f49f
...
...
@@ -679,10 +679,16 @@ UINT WINAPI ImeToAsciiEx(UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
return
msgs
;
}
else
if
((
lpIMC
=
LockRealIMC
(
hIMC
)))
else
{
UpdateDataInDefaultIMEWindow
(
lpIMC
,
hwnd
,
FALSE
);
UnlockRealIMC
(
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
);
}
}
return
0
;
}
...
...
dlls/winemac.drv/macdrv.h
View file @
4071f49f
...
...
@@ -277,6 +277,7 @@ extern NTSTATUS macdrv_dnd_have_format(void *arg) DECLSPEC_HIDDEN;
extern
NTSTATUS
macdrv_dnd_release
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_dnd_retain
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_ime_process_text_input
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_ime_get_text_input
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_notify_icon
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_client_func
(
enum
macdrv_client_funcs
func
,
const
void
*
params
,
...
...
dlls/winemac.drv/macdrv_main.c
View file @
4071f49f
...
...
@@ -635,6 +635,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
macdrv_dnd_retain
,
macdrv_ime_clear
,
macdrv_ime_process_text_input
,
macdrv_ime_get_text_input
,
macdrv_ime_using_input_method
,
macdrv_init
,
macdrv_notify_icon
,
...
...
@@ -761,6 +762,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
macdrv_dnd_retain
,
macdrv_ime_clear
,
wow64_ime_process_text_input
,
macdrv_ime_get_text_input
,
macdrv_ime_using_input_method
,
wow64_init
,
wow64_notify_icon
,
...
...
dlls/winemac.drv/unixlib.h
View file @
4071f49f
...
...
@@ -28,6 +28,7 @@ enum macdrv_funcs
unix_dnd_retain
,
unix_ime_clear
,
unix_ime_process_text_input
,
unix_ime_get_text_input
,
unix_ime_using_input_method
,
unix_init
,
unix_notify_icon
,
...
...
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