Alexandre Julliard : explorer: Only run the systray timer when a systray icon is present.
Module: wine Branch: master Commit: d8c022071aac960e4f1ba559f04911cfe435fba5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8c022071aac960e4f1ba559f0... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 18 09:31:26 2010 +0200 explorer: Only run the systray timer when a systray icon is present. --- programs/explorer/systray.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 9a4226a..615768f 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -340,6 +340,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) icon->owner = nid->hWnd; icon->display = -1; + if (list_empty( &icon_list )) SetTimer( tray_window, 1, 2000, NULL ); list_add_tail(&icon_list, &icon->entry); modify_icon( icon, nid ); @@ -355,6 +356,7 @@ static BOOL delete_icon(struct icon *icon) list_remove(&icon->entry); DestroyIcon(icon->image); HeapFree(GetProcessHeap(), 0, icon); + if (list_empty( &icon_list )) KillTimer( tray_window, 1 ); return TRUE; } @@ -596,6 +598,4 @@ void initialize_systray(void) } if (hide_systray) do_hide_systray(); - - SetTimer( tray_window, 1, 2000, NULL ); }
participants (1)
-
Alexandre Julliard