[v2 PATCH] user32/scroll: Move GetDCEx to stop DC leak
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu May 19 02:49:11 CDT 2016
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/user32/scroll.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c
index a210962..834a9da 100644
--- a/dlls/user32/scroll.c
+++ b/dlls/user32/scroll.c
@@ -882,7 +882,6 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
return;
}
- hdc = GetDCEx( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));
vertical = SCROLL_GetScrollBarRect( hwnd, nBar, &rect,
&arrowSize, &thumbSize, &thumbPos );
hwndOwner = (nBar == SB_CTL) ? GetParent(hwnd) : hwnd;
@@ -923,6 +922,8 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
return; /* Should never happen */
}
+ hdc = GetDCEx( hwnd, 0, DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW));
+
TRACE("Event: hwnd=%p bar=%d msg=%s pt=%d,%d hit=%d\n",
hwnd, nBar, SPY_GetMsgName(msg,hwnd), pt.x, pt.y, hittest );
--
1.9.1
More information about the wine-patches
mailing list