[0.4.9][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 eliminates perceived flickering when hovering
with the mouse over buttons in unthemed mode.
We suffered from these regressions for years and nobody did
find a proper solution, therefore it's time to at least workaround them.
The patch did not expose any new real-world-issues after I retested
the whole rapps suite against it in 0.4.12RCs.

CORE-13278 was once introduced/unhidden by SVN 73806 ==
c607de7

CORE-16093 was once introduced/unhidden by SVN 74149 ==
301c476

The comctl32 part of the fix was picked from 0.4.13-dev-1194-g
a40331b0f4
This commit is contained in:
Joachim Henze 2020-10-31 20:19:52 +01:00
parent fcd06d286b
commit 8377b4fd23

View file

@ -838,7 +838,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
nmhotitem.dwFlags = HICF_ENTERING;
SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem);
InvalidateRect(hWnd, NULL, TRUE);
theme = GetWindowTheme( hWnd );
if (theme)
InvalidateRect(hWnd, NULL, TRUE);
}
if(!TrackMouseEvent(&mouse_event) || !(mouse_event.dwFlags&TME_LEAVE))
@ -892,7 +894,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
nmhotitem.dwFlags = HICF_LEAVING;
SendMessageW(GetParent(hWnd), WM_NOTIFY, nmhotitem.hdr.idFrom, (LPARAM)&nmhotitem);
InvalidateRect(hWnd, NULL, TRUE);
theme = GetWindowTheme( hWnd );
if (theme)
InvalidateRect(hWnd, NULL, TRUE);
}
break;
#else