winex11: Add a timer to detect when a systray owner has been destroyed.
This commit is contained in:
parent
498a7628c9
commit
49f467c339
|
@ -185,6 +185,10 @@ static LRESULT WINAPI tray_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
if (!IsWindow( icon->owner )) delete_icon( icon );
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return DefWindowProcW(hwnd, msg, wparam, lparam);
|
return DefWindowProcW(hwnd, msg, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
@ -323,6 +327,7 @@ static BOOL show_icon( struct tray_icon *icon )
|
||||||
NULL, NULL, NULL, icon );
|
NULL, NULL, NULL, icon );
|
||||||
create_tooltip( icon );
|
create_tooltip( icon );
|
||||||
dock_systray_window( icon->window, systray_window );
|
dock_systray_window( icon->window, systray_window );
|
||||||
|
SetTimer( icon->window, 1, 1000, NULL );
|
||||||
ShowWindow( icon->window, SW_SHOWNA );
|
ShowWindow( icon->window, SW_SHOWNA );
|
||||||
icon->hidden = FALSE;
|
icon->hidden = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue