From 3825baf708dc1a7f41290fabad55d83b25a22637 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Jan 2018 19:45:32 +0100 Subject: [PATCH] Remove wx/dcbuffer.h dependency from wx/generic/combo.h This header doesn't really need to be included from here and it was done solely in order to get the value of wxALWAYS_NATIVE_DOUBLE_BUFFER from it. Move the code using this macro in the .cpp file instead. --- include/wx/generic/combo.h | 16 +--------------- src/generic/combog.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/wx/generic/combo.h b/include/wx/generic/combo.h index 92b3ff624e..dc9155394f 100644 --- a/include/wx/generic/combo.h +++ b/include/wx/generic/combo.h @@ -30,8 +30,6 @@ #endif -#include "wx/dcbuffer.h" - extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; class WXDLLIMPEXP_CORE wxGenericComboCtrl : public wxComboCtrlBase @@ -96,19 +94,7 @@ protected: #endif // For better transparent background rendering - virtual bool HasTransparentBackground() wxOVERRIDE - { - #if wxALWAYS_NATIVE_DOUBLE_BUFFER - #ifdef __WXGTK__ - // Sanity check for GTK+ - return IsDoubleBuffered(); - #else - return true; - #endif - #else - return false; - #endif - } + virtual bool HasTransparentBackground() wxOVERRIDE; // Mandatory virtuals virtual void OnResize() wxOVERRIDE; diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index 1bac5e630e..411dc2e782 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -198,6 +198,20 @@ wxGenericComboCtrl::~wxGenericComboCtrl() { } +bool wxGenericComboCtrl::HasTransparentBackground() +{ +#if wxALWAYS_NATIVE_DOUBLE_BUFFER + #ifdef __WXGTK__ + // Sanity check for GTK+ + return IsDoubleBuffered(); + #else + return true; + #endif +#else + return false; +#endif +} + void wxGenericComboCtrl::OnResize() {