X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=w32log.c;h=c524ffa246c4e1794d4a334e5aba909b4b994b6b;hp=3ca29e469dd47952e17f5d1de2eda6720c939b82;hb=b690bc1492107a4a61eabd844226d6d61aa42256;hpb=045dcac33c472b0ac5944574673951f1c8ddc3d8 diff --git a/w32log.c b/w32log.c index 3ca29e46..c524ffa2 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.44 2012/05/24 14:59:59 fabiankeil Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -724,8 +724,8 @@ HWND CreateLogWindow(HINSTANCE hInstance, int nCmdShow) /* SendMessage(g_hwndLogBox, EM_SETWORDWRAPMODE, 0, 0); */ /* Subclass the control to catch certain messages */ - g_fnLogBox = (WNDPROC) GetWindowLong(g_hwndLogBox, GWL_WNDPROC); - SetWindowLong(g_hwndLogBox, GWL_WNDPROC, (LONG) LogRichEditProc); + g_fnLogBox = (WNDPROC) GetWindowLongPtr(g_hwndLogBox, GWLP_WNDPROC); + SetWindowLongPtr(g_hwndLogBox, GWLP_WNDPROC, (LONG_PTR) LogRichEditProc); /* Minimizing looks stupid when the log window is not on the task bar, so hide instead */ if (!g_bShowOnTaskBar && @@ -948,7 +948,13 @@ void OnLogCommand(int nCommand) global_toggle_state = !global_toggle_state; log_error(LOG_LEVEL_INFO, "Now toggled %s", global_toggle_state ? "ON" : "OFF"); - SetIdleIcon(); + /* + * Leverage TIMER_ANIMSTOP_ID to set the idle icon through the + * "application queue". According to MSDN, 10 milliseconds are + * the lowest value possible and seem to be close enough to + * "instantly". + */ + SetTimer(g_hwndLogFrame, TIMER_ANIMSTOP_ID, 10, NULL); break; #endif /* def FEATURE_TOGGLE */