X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..6270539bcf24f2ec32150a09f8aad383f5de0671:/src/x11/popupwin.cpp diff --git a/src/x11/popupwin.cpp b/src/x11/popupwin.cpp index 89991df729..45b3a278c6 100644 --- a/src/x11/popupwin.cpp +++ b/src/x11/popupwin.cpp @@ -7,11 +7,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "popupwin.h" -#endif - #include "wx/defs.h" +#include "wx/log.h" #if wxUSE_POPUPWIN @@ -30,7 +27,9 @@ BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) +wxPopupWindow::~wxPopupWindow() +{ +} bool wxPopupWindow::Create( wxWindow *parent, int style ) { @@ -56,6 +55,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) int xscreen = DefaultScreen( xdisplay ); Visual *xvisual = DefaultVisual( xdisplay, xscreen ); Window xparent = RootWindow( xdisplay, xscreen ); + Colormap cm = DefaultColormap( xdisplay, xscreen); #if wxUSE_TWO_WINDOWS bool need_two_windows = @@ -70,6 +70,12 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) XSetWindowAttributes xattributes; long xattributes_mask = 0; + + m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + m_backgroundColour.CalcPixel( (WXColormap) cm); + + m_foregroundColour = *wxBLACK; + m_foregroundColour.CalcPixel( (WXColormap) cm); xattributes_mask |= CWBackPixel; xattributes.background_pixel = m_backgroundColour.GetPixel();