winex11: Add a timer to detect when a systray owner has been destroyed.

This commit is contained in:
Alexandre Julliard 2008-04-08 15:56:09 +02:00
parent 498a7628c9
commit 49f467c339
1 changed files with 5 additions and 0 deletions

View File

@ -185,6 +185,10 @@ static LRESULT WINAPI tray_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
}
break;
case WM_TIMER:
if (!IsWindow( icon->owner )) delete_icon( icon );
return 0;
default:
return DefWindowProcW(hwnd, msg, wparam, lparam);
}
@ -323,6 +327,7 @@ static BOOL show_icon( struct tray_icon *icon )
NULL, NULL, NULL, icon );
create_tooltip( icon );
dock_systray_window( icon->window, systray_window );
SetTimer( icon->window, 1, 1000, NULL );
ShowWindow( icon->window, SW_SHOWNA );
icon->hidden = FALSE;
return TRUE;