From d8c022071aac960e4f1ba559f04911cfe435fba5 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 18 Aug 2010 09:31:26 +0200 Subject: [PATCH] explorer: Only run the systray timer when a systray icon is present. --- programs/explorer/systray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 9a4226adb3c..615768f077f 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 ); } -- 2.11.4.GIT