diff --git a/clientgui/sg_DlgMessages.cpp b/clientgui/sg_DlgMessages.cpp index 868c3e0df0..b41ce42cbe 100644 --- a/clientgui/sg_DlgMessages.cpp +++ b/clientgui/sg_DlgMessages.cpp @@ -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(); diff --git a/clientgui/sg_DlgPreferences.cpp b/clientgui/sg_DlgPreferences.cpp index ff0c0b7f5d..f51d281950 100644 --- a/clientgui/sg_DlgPreferences.cpp +++ b/clientgui/sg_DlgPreferences.cpp @@ -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