From 9cf4320c9d18406a570d4472cbf1fe3ceaeaf555 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 20 Sep 2010 08:17:29 +0000 Subject: Make sure the tray icon in the taskbar gets destroyed upon exit --- xorg-server/hw/xwin/wintrayicon.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'xorg-server/hw/xwin/wintrayicon.c') diff --git a/xorg-server/hw/xwin/wintrayicon.c b/xorg-server/hw/xwin/wintrayicon.c index 7750932b4..52c7de3dc 100644 --- a/xorg-server/hw/xwin/wintrayicon.c +++ b/xorg-server/hw/xwin/wintrayicon.c @@ -85,25 +85,16 @@ void winDeleteNotifyIcon (winPrivScreenPtr pScreenPriv) { winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; - NOTIFYICONDATA nid = {0}; - - nid.cbSize = sizeof (NOTIFYICONDATA); - nid.hWnd = pScreenPriv->hwndScreen; - nid.uID = pScreenInfo->dwScreen; + if (!pScreenPriv->hiconNotifyIcon) + return; + /* Delete the tray icon */ - if (!Shell_NotifyIcon (NIM_DELETE, &nid)) - { - ErrorF ("winDeleteNotifyIcon - Shell_NotifyIcon failed\n"); - return; - } + Shell_NotifyIcon (NIM_DELETE, &nid); /* Free the icon that was loaded */ - if (pScreenPriv->hiconNotifyIcon != NULL - && DestroyIcon (pScreenPriv->hiconNotifyIcon) == 0) - { - ErrorF ("winDeleteNotifyIcon - DestroyIcon failed\n"); - } + DestroyIcon (pScreenPriv->hiconNotifyIcon); + pScreenPriv->hiconNotifyIcon = NULL; } -- cgit v1.2.3