X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=w32taskbar.c;h=c17e4d1aebcb2faeecfc075053c1fd472a0796e7;hp=b4ff9241b99215fd621654ea6eb634efb186dc39;hb=2c9ada84c1fd80a9d0afd7d29e16874d50cdffcf;hpb=375061cb39433e194051236d59d496815cc8db9e diff --git a/w32taskbar.c b/w32taskbar.c index b4ff9241..c17e4d1a 100644 --- a/w32taskbar.c +++ b/w32taskbar.c @@ -1,4 +1,4 @@ -const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.5 2002/03/24 12:03:47 jongfoster Exp $"; +const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.10 2006/09/23 13:26:38 roro Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32taskbar.c,v $ @@ -30,31 +30,16 @@ const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.5 2002/03/24 12:03:47 jongf * or write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * Revisions : - * $Log: w32taskbar.c,v $ - * Revision 1.5 2002/03/24 12:03:47 jongfoster - * Name change - * - * Revision 1.4 2001/11/16 00:46:31 jongfoster - * Fixing compiler warnings - * - * Revision 1.3 2001/05/22 18:56:28 oes - * CRLF -> LF - * - * Revision 1.2 2001/05/20 15:07:54 jongfoster - * File is now ignored if _WIN_CONSOLE is defined. - * - * Revision 1.1.1.1 2001/05/15 13:59:08 oes - * Initial import of version 2.9.3 source tree - * - * *********************************************************************/ - + #include "config.h" #include +#ifndef STRICT +#define STRICT +#endif #include #include "w32taskbar.h" @@ -69,6 +54,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); @@ -104,6 +90,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 ); @@ -264,7 +253,11 @@ LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return 0; default: - /* DO NOTHING */ + + if (msg == g_traycreatedmsg) + { + TrayAddIcon(g_hwndTrayX, 1, g_hiconApp, "Privoxy"); + } break; }