X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..9ec0e7da983d3c4de9c7007142a72864214514ac:/src/x11/popupwin.cpp diff --git a/src/x11/popupwin.cpp b/src/x11/popupwin.cpp index a9b07ccaab..b0435c0c51 100644 --- a/src/x11/popupwin.cpp +++ b/src/x11/popupwin.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -12,6 +12,7 @@ #endif #include "wx/defs.h" +#include "wx/log.h" #if wxUSE_POPUPWIN @@ -30,7 +31,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 +59,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 +74,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();