// 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
#include "wx/popupwin.h"
#include "wx/app.h"
+#include "wx/settings.h"
#include "wx/x11/private.h"
#include "X11/Xatom.h"
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
+wxPopupWindow::~wxPopupWindow()
+{
+}
+
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
- if (!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, "popup" ))
+ if (!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
{
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
return FALSE;
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 =
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();