]> git.saurik.com Git - wxWidgets.git/commitdiff
Only reparent first window if there are several children
authorJulian Smart <julian@anthemion.co.uk>
Mon, 11 Mar 2002 15:47:44 +0000 (15:47 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 11 Mar 2002 15:47:44 +0000 (15:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/x11/reparent.cpp

index 349aea15e8c1541df4f4abecea9a539461c194b3..2a57d3d339559408073982df3c729decfaea67e1 100644 (file)
@@ -144,7 +144,14 @@ bool wxReparenter::Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent)
 
     if (numchildren > 0)
     {
-        fprintf(stderr, "Reparenting %d children.\n", numchildren);
+        // TEST: see if we can get away with reparenting just
+        // first one
+        if (numchildren > 1)
+        {
+            wxLogDebug(wxT("Found %d, but only reparenting 1 child."), numchildren);
+            numchildren = 1;
+        }
+        wxLogDebug(wxT("Reparenting %d children."), numchildren);
         /* Stacking order is preserved since XQueryTree returns its children in
            bottommost to topmost order
          */