From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winemac.drv/dllmain.c | 7 +++++++ dlls/winemac.drv/macdrv.h | 4 ++++ dlls/winemac.drv/macdrv_main.c | 1 + dlls/winemac.drv/systray.c | 8 +++++--- dlls/winemac.drv/unixlib.h | 8 ++++++++ 5 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c index 60ca50474d7..23a1e6e2218 100644 --- a/dlls/winemac.drv/dllmain.c +++ b/dlls/winemac.drv/dllmain.c @@ -21,6 +21,7 @@ #include "config.h" #include <stdarg.h> #include "macdrv.h" +#include "shellapi.h"
HMODULE macdrv_module = 0; @@ -63,3 +64,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) macdrv_module = instance; return process_attach(); } + +int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data) +{ + struct notify_icon_params params = { .msg = msg, .data = data }; + return MACDRV_CALL(notify_icon, ¶ms); +} diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 39aff4d6a9f..a4736b2d315 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -294,6 +294,10 @@ extern void macdrv_im_set_text(const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_sent_text_input(const macdrv_event *event) DECLSPEC_HIDDEN; extern BOOL query_ime_char_rect(macdrv_query* query) DECLSPEC_HIDDEN;
+/* unixlib interface */ + +extern NTSTATUS macdrv_notify_icon(void *arg) DECLSPEC_HIDDEN; + /* user helpers */
static inline LRESULT send_message(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index adcf6f73fc7..6ab7b108909 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -610,6 +610,7 @@ BOOL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, const unixlib_entry_t __wine_unix_call_funcs[] = { macdrv_init, + macdrv_notify_icon, };
C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count ); diff --git a/dlls/winemac.drv/systray.c b/dlls/winemac.drv/systray.c index a5ea7e55d79..c1901ae0036 100644 --- a/dlls/winemac.drv/systray.c +++ b/dlls/winemac.drv/systray.c @@ -245,12 +245,14 @@ static BOOL delete_icon(struct tray_icon *icon) * * Driver-side implementation of Shell_NotifyIcon. */ -int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data) +NTSTATUS macdrv_notify_icon(void *arg) { + struct notify_icon_params *params = arg; + NOTIFYICONDATAW *data = params->data; BOOL ret = FALSE; struct tray_icon *icon;
- switch (msg) + switch (params->msg) { case NIM_ADD: ret = add_icon(data); @@ -272,7 +274,7 @@ int CDECL wine_notify_icon(DWORD msg, NOTIFYICONDATAW *data) } break; default: - FIXME("unhandled tray message: %u\n", msg); + FIXME("unhandled tray message: %u\n", params->msg); break; } return ret; diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index 9f8cd4e0acb..c24f8192142 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -22,6 +22,7 @@ enum macdrv_funcs { unix_init, + unix_notify_icon, unix_funcs_count };
@@ -41,3 +42,10 @@ struct init_params { struct localized_string *strings; }; + +/* macdrv_notify_icon params */ +struct notify_icon_params +{ + DWORD msg; + struct _NOTIFYICONDATAW *data; +};