If you compile wxWindows on Linux for the first time and don't like to read
install instructions just do (in the base dir):
-> ./configure --with-x11 --with-universal
+> ./configure --with-x11
> make
> su <type root password>
> make install
install.txt, but if you cannot wait, this should work on
many systems:
-./configure --with-x11 --with-universal
+./configure --with-x11 --disable-shared --with-x11 --with-debug_flag --enable-log --with-debug_info --enable-debug --without-threads --without-sockets -without-odbc -with-libjpeg --enable-debug_cntxt --disable-no_rtti"
+
make
su <type root password>
make install
// ----------------------------------------------------------------------------
// the application icon (under Windows and OS/2 it is in resources)
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
#include "mondrian.xpm"
#endif
info = CLASSINFO(wxWindowMSW);
# elif defined(__WXGTK__)
info = CLASSINFO(wxWindowGTK);
+# elif defined(__WXX11__)
+ info = CLASSINFO(wxWindowX11);
# elif defined(__WXMGL__)
info = CLASSINFO(wxWindowMGL);
# elif defined(__WXPM__)
// Create an application context
bool wxApp::OnInitGui()
{
+ if (!wxAppBase::OnInitGui())
+ return FALSE;
+
// TODO: parse argv and get display to pass to XOpenDisplay
Display* dpy = XOpenDisplay(NULL);
m_initialDisplay = (WXDisplay*) dpy;
{
Window parent, root = 0;
unsigned int noChildren = 0;
- if (XQueryTree((Display*) wxGetDisplay(), window, & root, & parent,
- NULL, & noChildren))
+ Window* children = NULL;
+ int res = XQueryTree((Display*) wxGetDisplay(), window, & root, & parent,
+ & children, & noChildren);
+ if (children)
+ XFree(children);
+ if (res)
return parent;
else
return (Window) 0;
XWMHints wm_hints;
long xattributes_mask =
- CWEventMask |
+ CWOverrideRedirect |
CWBorderPixel | CWBackPixel;
xattributes.background_pixel = BlackPixel( xdisplay, xscreen );
xattributes.border_pixel = BlackPixel( xdisplay, xscreen );
XWMHints wm_hints;
long xattributes_mask =
- CWEventMask |
+ CWOverrideRedirect |
CWBorderPixel | CWBackPixel;
xattributes.background_pixel = BlackPixel( xdisplay, xscreen );
xattributes.border_pixel = BlackPixel( xdisplay, xscreen );
Window window = XCreateSimpleWindow(wxGlobalDisplay(), parentWindow,
x, y, w, h, 0,
m_backgroundColour.AllocColour(wxGlobalDisplay()),
- m_foregroundColour.AllocColour(wxGlobalDisplay()));
+ m_foregroundColour.AllocColour(wxGlobalDisplay()));
+ m_mainWidget = (WXWindow) window;
// Select event types wanted
XSelectInput(wxGlobalDisplay(), window,