[PATCH] user32/scroll: Move GetDCEx to stop DC leak

Alexandre Julliard julliard at winehq.org
Wed May 18 07:03:30 CDT 2016


Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:

> @@ -920,9 +919,12 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
>            break;
>  
>        default:
> +          WARN("unsupported msg %s\n", SPY_GetMsgName(msg,hwnd));
>            return;  /* Should never happen */
>      }
>  
> +    hdc = GetDCEx( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));

The function is only called for the messages it supports, so there's no
need to add handling for other cases.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list