diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index e4b86301..faaf6e4d 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -1817,19 +1817,16 @@ void DrawingPanelBase::DrawArea(uint8_t** data) } // next, draw the frame (queue a PaintEv) Refresh must be used under - // Wayland or nothing is drawn, however it causes high CPU usage with GTK2, - // so use the old method in that case -#if !defined(__WXGTK__) || defined(__WXGTK3__) - GetWindow()->Refresh(); -#else - { + // Wayland or nothing is drawn. + if (wxGetApp().UsingWayland()) + GetWindow()->Refresh(); + else { DrawingPanelBase* panel = wxGetApp().frame->GetPanel()->panel; if (panel) { wxClientDC dc(panel->GetWindow()); panel->DrawArea(dc); } } -#endif // finally, draw on-screen text using wx method, if possible // this method flickers too much right now