X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/x11/popupwin.cpp diff --git a/src/x11/popupwin.cpp b/src/x11/popupwin.cpp index 89991df729..34d95b1f2c 100644 --- a/src/x11/popupwin.cpp +++ b/src/x11/popupwin.cpp @@ -7,11 +7,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "popupwin.h" #endif #include "wx/defs.h" +#include "wx/log.h" #if wxUSE_POPUPWIN @@ -32,6 +33,10 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) +wxPopupWindow::~wxPopupWindow() +{ +} + bool wxPopupWindow::Create( wxWindow *parent, int style ) { if (!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") )) @@ -56,6 +61,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 +76,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();