Merge pull request #5531 from AenBleidd/vko_fix_blank_windows_on_simple_gui

[Linux] Fix blank windows in Simple GUI.
This commit is contained in:
David Anderson 2024-03-07 16:04:15 -08:00 committed by GitHub
commit b90373e1c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -187,7 +187,11 @@ void CPanelMessages::OnEraseBackground(wxEraseEvent& event){
wxSize sz = GetClientSize();
// Create a buffered device context to reduce flicker
#ifndef __WXGTK__
wxBufferedDC dc(event.GetDC(), sz, wxBUFFER_CLIENT_AREA);
#else
wxDC &dc = *event.GetDC();
#endif
// bitmap dimensions
w = bmp.GetWidth();

View File

@ -534,9 +534,13 @@ void CPanelPreferences::OnEraseBackground( wxEraseEvent& event ) {
if (!m_backgroundBitmap) {
MakeBackgroundBitmap();
}
// Create a buffered device context to reduce flicker
wxSize sz = GetClientSize();
// Create a buffered device context to reduce flicker
#ifndef __WXGTK__
wxBufferedDC dc(event.GetDC(), sz, wxBUFFER_CLIENT_AREA);
#else
wxDC &dc = *event.GetDC();
#endif
#if TEST_BACKGROUND_WITH_MAGENTA_FILL
// Fill the dialog with a magenta color so people can detect when something