Skip to content

Commit 9513c9b

Browse files
committed
[0.4.12][COMCTL32] Workaround v6 button redraw regressions CORE-13278 & CORE-16093
Most likely not correct, as it breaks comctl32:buttonv6 tests https://reactos.org/testman/compare.php?ids=68146,68147 But greatly improves perceived flickering when hovering with the mouse about buttons in unthemed mode. We still fear that this workaround could break buttons that intend to change their appearance when being hovered. We workaround only the RC, but will leave master affected for now.
1 parent ab7f77a commit 9513c9b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dll/win32/comctl32/button.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
842842
nmhotitem.dwFlags = HICF_ENTERING;
843843
SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem);
844844

845-
InvalidateRect(hWnd, NULL, TRUE);
845+
theme = GetWindowTheme( hWnd );
846+
if (theme)
847+
InvalidateRect(hWnd, NULL, TRUE);
846848
}
847849

848850
if(!TrackMouseEvent(&mouse_event) || !(mouse_event.dwFlags&TME_LEAVE))
@@ -896,7 +898,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
896898
nmhotitem.dwFlags = HICF_LEAVING;
897899
SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem);
898900

899-
InvalidateRect(hWnd, NULL, TRUE);
901+
theme = GetWindowTheme( hWnd );
902+
if (theme)
903+
InvalidateRect(hWnd, NULL, TRUE);
900904
}
901905
break;
902906
#else

0 commit comments

Comments
 (0)