git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14209 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 
     Window parentWindow = (Window) parent->GetMainWindow();
 
 
     Window parentWindow = (Window) parent->GetMainWindow();
 
+    wxSize size2(size);
+    if (size2.x == -1)
+       size2.x = 100;
+    if (size2.y == -1)
+       size2.y = 100;
+
+    wxPoint pos2(pos);
+    if (pos2.x == -1)
+       pos2.x = 100;
+    if (pos2.y == -1)
+       pos2.y = 100;
+    
     Window window = XCreateSimpleWindow( 
         xdisplay, parentWindow,
     Window window = XCreateSimpleWindow( 
         xdisplay, parentWindow,
+        pos2.x, pos2.y, size2.x, size2.y, 0, 
         m_backgroundColour.GetPixel(),
         m_backgroundColour.GetPixel() );
         
         m_backgroundColour.GetPixel(),
         m_backgroundColour.GetPixel() );
         
     // sample).
     SetCursor(*wxSTANDARD_CURSOR);
     SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
     // sample).
     SetCursor(*wxSTANDARD_CURSOR);
     SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
-    SetSize(pos.x, pos.y, size.x, size.y);
+
+    // Don't call this, it can have nasty repercussions for composite controls,
+    // for example
+    //    SetSize(pos.x, pos.y, size.x, size.y);
         return;
 
     XWindowChanges windowChanges;
         return;
 
     XWindowChanges windowChanges;
+    windowChanges.x = 0;
+    windowChanges.y = 0;
+    windowChanges.width = 0;
+    windowChanges.height = 0;
+    windowChanges.stack_mode = 0;
     int valueMask = 0;
 
     if (x != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     int valueMask = 0;
 
     if (x != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     if (width != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     {
         windowChanges.width = width /* - m_borderSize*2 */;
     if (width != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     {
         windowChanges.width = width /* - m_borderSize*2 */;
+       if (windowChanges.width == 0)
+           windowChanges.width = 1;
         valueMask |= CWWidth;
     }
     if (height != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     {
         windowChanges.height = height /* -m_borderSize*2*/;
         valueMask |= CWWidth;
     }
     if (height != -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     {
         windowChanges.height = height /* -m_borderSize*2*/;
+       if (windowChanges.height == 0)
+           windowChanges.height = 1;