Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        borders.c moveresize.c pager.c 


Log Message:
Fix several window placement bugs.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -3 -r1.196 -r1.197
--- borders.c   26 Jun 2004 17:49:01 -0000      1.196
+++ borders.c   26 Jun 2004 18:24:39 -0000      1.197
@@ -538,8 +538,8 @@
      }                         /* ((!ewin->client.already_placed) && (!manplace)) */
    else
      {
-       x = ewin->client.x;
-       y = ewin->client.y;
+       x = ewin->x;
+       y = ewin->y;
        switch (ewin->client.grav)
          {
          case NorthWestGravity:
@@ -1150,10 +1150,10 @@
 }
 
 static void
-EwinGetSize(EWin * ewin)
+EwinGetGeometry(EWin * ewin)
 {
-   ewin->x = ewin->client.x - ewin->border->border.left;
-   ewin->y = ewin->client.y - ewin->border->border.top;
+   ewin->shape_x = ewin->x = ewin->client.x - ewin->border->border.left;
+   ewin->shape_y = ewin->y = ewin->client.y - ewin->border->border.top;
    ewin->w = ewin->client.w +
       ewin->border->border.left + ewin->border->border.right;
    ewin->h = ewin->client.h +
@@ -1183,15 +1183,14 @@
    MatchEwinToSnapInfo(ewin);
    if (Mode.wm.startup)
       ICCCM_GetEInfo(ewin);
+   ICCCM_MatchSize(ewin);
+   ICCCM_Adopt(ewin);
 
    if (!ewin->border)
       EwinSetBorderInit(ewin);
    EwinSetBorderTo(ewin, NULL);
 
-   ICCCM_MatchSize(ewin);
-   ICCCM_Adopt(ewin);
-
-   EwinGetSize(ewin);
+   EwinGetGeometry(ewin);
    EwinEventsConfigure(ewin, 0);
 
    UngrabX();
@@ -1258,15 +1257,14 @@
        break;
      }
    MatchEwinToSnapInfo(ewin);
+   ICCCM_MatchSize(ewin);
+   ICCCM_Adopt(ewin);
 
    if (!ewin->border)
       EwinSetBorderInit(ewin);
    EwinSetBorderTo(ewin, NULL);
 
-   ICCCM_MatchSize(ewin);
-   ICCCM_Adopt(ewin);
-
-   EwinGetSize(ewin);
+   EwinGetGeometry(ewin);
    EwinEventsConfigure(ewin, 0);
 
    UngrabX();
@@ -1575,7 +1573,7 @@
 EwinSetBorderTo(EWin * ewin, Border * b)
 {
    int                 i;
-   int                 px = -1, py = -1;
+   int                 px = 0, py = 0;
    char                s[1024];
 
    AwaitIclass        *await;
@@ -1693,12 +1691,7 @@
 
    if (!ewin->shaded)
       EMoveWindow(disp, ewin->win_container, b->border.left, b->border.top);
-   if ((px >= 0) && (py >= 0))
-     {
-       MoveEwin(ewin, ewin->x + (px - ewin->border->border.left),
-                ewin->y + (py - ewin->border->border.top));
-     }
-   ICCCM_Configure(ewin);
+
    CalcEwinSizes(ewin);
    PropagateShapes(ewin->win);
 
@@ -1716,6 +1709,7 @@
        if (ewin->border != b)
          {
             EwinSetBorderTo(ewin, b);
+            EwinGetGeometry(ewin);
             ICCCM_MatchSize(ewin);
             MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w,
                            ewin->client.h);
@@ -1857,8 +1851,8 @@
           move = 1;
        ewin->x = x;
        ewin->y = y;
-       ewin->client.x += dx;
-       ewin->client.y += dy;
+       ewin->client.x = x + ewin->border->border.left;
+       ewin->client.y = y + ewin->border->border.top;
      }
 
    if (flags & MR_FLAGS_RESIZE)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- moveresize.c        18 Jun 2004 20:12:09 -0000      1.18
+++ moveresize.c        26 Jun 2004 18:24:39 -0000      1.19
@@ -74,6 +74,9 @@
           DrawEwinShape(gwins[i], Conf.movemode, gwins[i]->x, gwins[i]->y,
                         gwins[i]->client.w, gwins[i]->client.h, 0);
 #endif
+       /* This shouldn't be necessary ... will figure it out some other time */
+       gwins[i]->shape_x = gwins[i]->x;
+       gwins[i]->shape_y = gwins[i]->y;
      }
    Efree(gwins);
    move_swapcoord_x = ewin->x;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- pager.c     18 Jun 2004 20:12:09 -0000      1.96
+++ pager.c     26 Jun 2004 18:24:39 -0000      1.97
@@ -370,7 +370,7 @@
        ewin->client.h = 1;
        if (sn)
          {
-            ResizeEwin(ewin, w, h);
+            MoveResizeEwin(ewin, ewin->x, ewin->y, w, h);
          }
        else
          {




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to