From c53c2461ab3ca243a5059132508b8ef6a4e8e968 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 17 Mar 2025 13:52:40 +1100 Subject: Handle setting redraw back on correctly as documented by Microsoft. Will allow future simplification of logic and optimization. --- win32/PlatWin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index c8c0a6945..f7887d8f6 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -3673,8 +3673,9 @@ POINT ListBoxX::MaxTrackSize() const noexcept { void ListBoxX::SetRedraw(bool on) noexcept { ::SendMessage(lb, WM_SETREDRAW, on, 0); - if (on) - ::InvalidateRect(lb, nullptr, TRUE); + if (on) { + ::RedrawWindow(lb, {}, {}, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); + } } void ListBoxX::ResizeToCursor() { -- cgit v1.2.3