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.
This commit is contained in:
Vadim Zeitlin 2023-12-26 19:48:36 +01:00
parent 3e32e0fa67
commit 15af320353

View file

@ -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