From: oes Date: Wed, 20 Nov 2002 14:39:32 +0000 (+0000) Subject: Applied patch by Mattes Dolak which adds re-creation of the win32 taskbar X-Git-Tag: v_3_0_1~72 X-Git-Url: http://www.privoxy.org/gitweb/@user-manual@actions-file.html?a=commitdiff_plain;h=94f6d56282417439aad0945eb4076b7de00c0cf1;p=privoxy.git Applied patch by Mattes Dolak which adds re-creation of the win32 taskbar icon on reception of the "TaskbarCreated" window message. --- diff --git a/w32taskbar.c b/w32taskbar.c index 721ad08e..8a70b29e 100644 --- a/w32taskbar.c +++ b/w32taskbar.c @@ -1,7 +1,7 @@ -const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.6 2002/03/26 22:57:10 jongfoster Exp $"; +const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.7 2002/03/31 17:19:00 jongfoster Exp $"; /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/w32taskbar.c,v $ + * File : $Source: /cvsroot/ijbswa/current/Attic/w32taskbar.c,v $ * * Purpose : Functions for creating, setting and destroying the * workspace tray icon @@ -32,6 +32,9 @@ const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.6 2002/03/26 22:57:10 jongf * * Revisions : * $Log: w32taskbar.c,v $ + * Revision 1.7 2002/03/31 17:19:00 jongfoster + * Win32 only: Enabling STRICT to fix a VC++ compile warning. + * * Revision 1.6 2002/03/26 22:57:10 jongfoster * Web server name should begin www. * @@ -75,6 +78,7 @@ const char w32taskbar_h_rcs[] = W32TASKBAR_H_VERSION; static HMENU g_hmenuTray; static HWND g_hwndTrayX; +static UINT g_traycreatedmsg; static LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); @@ -110,6 +114,9 @@ HWND CreateTrayWindow(HINSTANCE hInstance) RegisterClass(&wc); + /* TaskbarCreated is sent to a window when it should re-add its tray icons */ + g_traycreatedmsg = RegisterWindowMessage("TaskbarCreated"); + g_hwndTrayX = CreateWindow(szWndName, szWndName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL ); @@ -270,7 +277,11 @@ LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return 0; default: - /* DO NOTHING */ + + if (msg == g_traycreatedmsg) + { + TrayAddIcon(g_hwndTray, 1, g_hiconApp, "Privoxy"); + } break; }