Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.c 


Log Message:
Fix bug when reparenting to nested E.

===================================================================
RCS file: /cvs/e/e16/e/src/ewins.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -3 -r1.157 -r1.158
--- ewins.c     23 Apr 2006 22:11:26 -0000      1.157
+++ ewins.c     23 Apr 2006 22:14:32 -0000      1.158
@@ -1013,7 +1013,7 @@
 }
 
 static void
-EwinWithdraw(EWin * ewin)
+EwinWithdraw(EWin * ewin, Window to)
 {
    Window              win;
    int                 x, y;
@@ -1029,15 +1029,18 @@
    ESelectInput(_EwinGetClientWin(ewin), NoEventMask);
    XShapeSelectInput(disp, _EwinGetClientXwin(ewin), NoEventMask);
 
-   /* Park the client window on the root */
-   x = ewin->client.x;
-   y = ewin->client.y;
-   ETranslateCoordinates(_EwinGetClientWin(ewin), VRoot.win,
-                        -ewin->border->border.left,
-                        -ewin->border->border.top, &x, &y, &win);
-   EReparentWindow(_EwinGetClientWin(ewin), VRoot.win, x, y);
+   if (EWindowGetParent(_EwinGetClientWin(ewin)) == 
_EwinGetContainerXwin(ewin))
+     {
+       /* Park the client window on the new root */
+       x = ewin->client.x;
+       y = ewin->client.y;
+       ETranslateCoordinates(_EwinGetClientWin(ewin), VRoot.win,
+                             -ewin->border->border.left,
+                             -ewin->border->border.top, &x, &y, &win);
+       EReparentWindow(_EwinGetClientWin(ewin), to, x, y);
+       HintsDelWindowHints(ewin);
+     }
    ICCCM_Withdraw(ewin);
-   HintsDelWindowHints(ewin);
 
    ESync();
    EUngrabServer();
@@ -1166,8 +1169,7 @@
    if (EoIsGone(ewin))
       return;
 
-   if (EWindowGetParent(_EwinGetClientWin(ewin)) == 
_EwinGetContainerXwin(ewin))
-      EwinWithdraw(ewin);
+   EwinWithdraw(ewin, VRoot.win);
 }
 
 static void
@@ -1325,7 +1327,7 @@
 void
 EwinReparent(EWin * ewin, Window parent)
 {
-   EReparentWindow(_EwinGetClientWin(ewin), parent, 0, 0);
+   EwinWithdraw(ewin, parent);
 }
 
 void




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to