+ xattributes.event_mask =
+ ExposureMask | StructureNotifyMask | ColormapChangeMask;
+
+ Window xwindow = XCreateWindow( xdisplay, xparent, pos2.x, pos2.y, size2.x, size2.y,
+ 0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
+
+ XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
+
+ m_mainWindow = (WXWindow) xwindow;
+ wxAddWindowToTable( xwindow, (wxWindow*) this );
+
+ XMapWindow( xdisplay, xwindow );
+
+ xattributes.event_mask =
+ ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
+ ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask |
+ KeymapStateMask | FocusChangeMask | ColormapChangeMask | StructureNotifyMask |
+ PropertyChangeMask | VisibilityChangeMask ;
+
+ if (HasFlag( wxNO_FULL_REPAINT_ON_RESIZE ))
+ {
+ xattributes_mask |= CWBitGravity;
+ xattributes.bit_gravity = StaticGravity;
+ }
+
+ xwindow = XCreateWindow( xdisplay, xwindow, 0, 0, size2.x, size2.y,
+ 0, DefaultDepth(xdisplay,xscreen), InputOutput, xvisual, xattributes_mask, &xattributes );
+
+ XSetWindowBackgroundPixmap( xdisplay, xwindow, None );
+
+ m_clientWindow = (WXWindow) xwindow;
+ wxAddClientWindowToTable( xwindow, (wxWindow*) this );
+
+ XMapWindow( xdisplay, xwindow );