Module: wine Branch: master Commit: c703c96a7816852f39489d10bc0f7cc223791efa URL: https://source.winehq.org/git/wine.git/?a=commit;h=c703c96a7816852f39489d10b...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Thu Mar 4 16:47:37 2021 +0800
comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/listview.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a62ac4398cc..150771b8937 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -10612,11 +10612,11 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) * [I] region : update region * * RETURN: - * TRUE - frame was painted - * FALSE - call default window proc + * 0 - frame was painted */ -static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) +static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) { + LONG exstyle = GetWindowLongW (infoPtr->hwndSelf, GWL_EXSTYLE); HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); HDC dc; RECT r; @@ -10624,7 +10624,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) int cxEdge = GetSystemMetrics (SM_CXEDGE), cyEdge = GetSystemMetrics (SM_CYEDGE);
- if (!theme) + if (!theme || !(exstyle & WS_EX_CLIENTEDGE)) return DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)region, 0);
GetWindowRect(infoPtr->hwndSelf, &r); @@ -10646,7 +10646,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)cliprgn, 0); DeleteObject(cliprgn);
- return FALSE; + return 0; }
/***