explorer: Add a generic handler for desktop notifications.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-05-31 13:54:07 +09:00
parent 596c16cc13
commit f4568fc640
3 changed files with 14 additions and 3 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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 )
{