From 15af32035311dcf5c1b22b8ba05aa861c3682a00 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Dec 2023 19:48:36 +0100 Subject: [PATCH] Fix updating wxAUI frame buttons on mouse hover This didn't work under wxOSX or wxGTK/Wayland as it used wxClientDC which doesn't work in these ports. Fix this in the usual way, i.e. by just redrawing everything in them. --- src/aui/framemanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 793e9498be..3fe78a8a3c 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -4084,7 +4084,14 @@ void wxAuiManager::UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part, state = wxAUI_BUTTON_STATE_HOVER; } - // now repaint the button with hover state + // now repaint the button with hover state -- or everything if we can't + // repaint just it + if ( !wxClientDC::CanBeUsedForDrawing(m_frame) ) + { + m_frame->Refresh(); + m_frame->Update(); + } + wxClientDC cdc(m_frame); // if the frame has a toolbar, the client area