Alexandre Julliard : explorer: Add a generic handler for desktop notifications.
Alexandre Julliard
julliard at winehq.org
Tue May 31 10:42:52 CDT 2016
Module: wine
Branch: master
Commit: f4568fc6402c84e2053eb288f84d33f79025118e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f4568fc6402c84e2053eb288f84d33f79025118e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 31 13:54:07 2016 +0900
explorer: Add a generic handler for desktop notifications.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/explorer/desktop.c | 2 +-
programs/explorer/explorer_private.h | 2 +-
programs/explorer/systray.c | 13 ++++++++++++-
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 2b8502b..d306bb9 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -636,7 +636,7 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR
return 0;
case WM_PARENTNOTIFY:
- if (LOWORD(wp) == WM_DESTROY) cleanup_systray_window( (HWND)lp );
+ handle_parent_notify( (HWND)lp, wp );
return 0;
case WM_LBUTTONDBLCLK:
diff --git a/programs/explorer/explorer_private.h b/programs/explorer/explorer_private.h
index dbe50be..995e7eb 100644
--- a/programs/explorer/explorer_private.h
+++ b/programs/explorer/explorer_private.h
@@ -24,7 +24,7 @@
extern void manage_desktop( WCHAR *arg ) DECLSPEC_HIDDEN;
extern void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL enable_shell ) DECLSPEC_HIDDEN;
extern void initialize_appbar(void) DECLSPEC_HIDDEN;
-extern void cleanup_systray_window( HWND hwnd ) DECLSPEC_HIDDEN;
+extern void handle_parent_notify( HWND hwnd, WPARAM wp ) DECLSPEC_HIDDEN;
extern void do_startmenu( HWND owner ) DECLSPEC_HIDDEN;
extern LRESULT menu_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) DECLSPEC_HIDDEN;
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c
index eca49f7..8406ad2 100644
--- a/programs/explorer/systray.c
+++ b/programs/explorer/systray.c
@@ -447,7 +447,7 @@ static BOOL delete_icon(struct icon *icon)
}
/* cleanup icons belonging to a window that has been destroyed */
-void cleanup_systray_window( HWND hwnd )
+static void cleanup_systray_window( HWND hwnd )
{
struct icon *icon, *next;
@@ -680,6 +680,17 @@ static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
return 0;
}
+/* notifcation posted to the desktop window */
+void handle_parent_notify( HWND hwnd, WPARAM wp )
+{
+ switch (LOWORD(wp))
+ {
+ case WM_DESTROY:
+ cleanup_systray_window( hwnd );
+ break;
+ }
+}
+
/* this function creates the listener window */
void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL arg_enable_shell )
{
More information about the wine-cvs
mailing list