From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winemac.drv/dllmain.c | 1 + dlls/winemac.drv/dragdrop.c | 9 +++++---- dlls/winemac.drv/event.c | 11 +++++++++++ dlls/winemac.drv/macdrv.h | 3 ++- dlls/winemac.drv/unixlib.h | 9 ++++++++- 5 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c index d38e7cf9164..493062521ad 100644 --- a/dlls/winemac.drv/dllmain.c +++ b/dlls/winemac.drv/dllmain.c @@ -29,6 +29,7 @@ HMODULE macdrv_module = 0; typedef NTSTATUS (WINAPI *kernel_callback)(void *params, ULONG size); static const kernel_callback kernel_callbacks[] = { + macdrv_dnd_query_exited, macdrv_ime_query_char_rect, macdrv_ime_set_text, }; diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c index a07b66ac14a..d5de2abb37a 100644 --- a/dlls/winemac.drv/dragdrop.c +++ b/dlls/winemac.drv/dragdrop.c @@ -482,14 +482,15 @@ BOOL query_drag_drop(macdrv_query* query)
/************************************************************************** - * query_drag_exited + * macdrv_dnd_query_exited */ -BOOL query_drag_exited(macdrv_query* query) +NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size) { - HWND hwnd = macdrv_get_window_hwnd(query->window); + struct dnd_query_exited_params *params = arg; + HWND hwnd = params->hwnd; IDropTarget *droptarget;
- TRACE("win %p/%p\n", hwnd, query->window); + TRACE("win %p\n", hwnd);
droptarget = get_droptarget_pointer(last_droptarget_hwnd); if (droptarget) diff --git a/dlls/winemac.drv/event.c b/dlls/winemac.drv/event.c index 43cd3f85bcd..361709010c9 100644 --- a/dlls/winemac.drv/event.c +++ b/dlls/winemac.drv/event.c @@ -179,6 +179,17 @@ static void macdrv_sent_text_input(const macdrv_event *event) }
+/************************************************************************** + * query_drag_exited + */ +static BOOL query_drag_exited(macdrv_query *query) +{ + struct dnd_query_exited_params params; + params.hwnd = macdrv_get_window_hwnd(query->window); + return macdrv_client_func(client_func_dnd_query_exited, ¶ms, sizeof(params)); +} + + /************************************************************************** * query_ime_char_rect */ diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index e125bb03b4d..c0f2811c5f5 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -261,7 +261,6 @@ extern BOOL macdrv_pasteboard_has_format(CFTypeRef pasteboard, UINT desired_form extern UINT* macdrv_get_pasteboard_formats(CFTypeRef pasteboard, UINT* num_formats) DECLSPEC_HIDDEN;
extern BOOL query_drag_operation(macdrv_query* query) DECLSPEC_HIDDEN; -extern BOOL query_drag_exited(macdrv_query* query) DECLSPEC_HIDDEN; extern BOOL query_drag_drop(macdrv_query* query) DECLSPEC_HIDDEN;
extern struct opengl_funcs *macdrv_wine_get_wgl_driver(UINT version) DECLSPEC_HIDDEN; @@ -298,6 +297,8 @@ extern NTSTATUS macdrv_notify_icon(void *arg) DECLSPEC_HIDDEN; extern NTSTATUS macdrv_client_func(enum macdrv_client_funcs func, const void *params, ULONG size) DECLSPEC_HIDDEN;
+extern NTSTATUS WINAPI macdrv_dnd_query_exited(void *arg, ULONG size) DECLSPEC_HIDDEN; + /* user helpers */
static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index d0950e63c3c..067f46c8f5d 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -67,11 +67,18 @@ struct notify_icon_params /* driver client callbacks exposed with KernelCallbackTable interface */ enum macdrv_client_funcs { - client_func_ime_query_char_rect = NtUserDriverCallbackFirst, + client_func_dnd_query_exited = NtUserDriverCallbackFirst, + client_func_ime_query_char_rect, client_func_ime_set_text, client_func_last };
+/* macdrv_dnd_query_exited params */ +struct dnd_query_exited_params +{ + HWND hwnd; +}; + /* macdrv_ime_query_char_rect result */ struct ime_query_char_rect_result {