Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h areas.c borders.c 


Log Message:
Fix viewport change (window sliding) for windows with transients.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -3 -r1.231 -r1.232
--- E.h 22 Mar 2004 16:36:02 -0000      1.231
+++ E.h 22 Mar 2004 16:46:52 -0000      1.232
@@ -1967,6 +1967,7 @@
 #define EDBUG_TYPE_COMPRESSION 129
 #define EDBUG_TYPE_STACKING    130
 #define EDBUG_TYPE_RAISELOWER  131
+#define EDBUG_TYPE_MOVERESIZE  132
 int                 EventDebug(unsigned int type);
 #else
 #define             EventDebug(type) 0
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/areas.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- areas.c     20 Mar 2004 15:49:04 -0000      1.63
+++ areas.c     22 Mar 2004 16:46:52 -0000      1.64
@@ -246,7 +246,7 @@
 void
 SetCurrentArea(int ax, int ay)
 {
-   EWin              **lst;
+   EWin               *ewin, **lst;
    int                 i, num, a1, a2, x, y, dx, dy;
    ToolTip            *tt;
 
@@ -298,21 +298,22 @@
             /* create the list of windwos to move */
             for (i = 0; i < num; i++)
               {
-                 if ((lst[i]->desktop == desks.current) && (!lst[i]->sticky)
-                     && (!lst[i]->fixedpos) && (!lst[i]->iconified))
+                 ewin = lst[i];
+                 if (ewin->desktop != desks.current || ewin->sticky ||
+                     ewin->fixedpos || ewin->iconified)
+                    continue;
+
+                 if ((ewin->floating) && (Conf.movemode > 0))
                    {
-                      if ((lst[i]->floating) && (Conf.movemode > 0))
-                        {
-                           wnum++;
-                           wl = Erealloc(wl, sizeof(Window) * wnum);
-                           wl[wnum - 1] = lst[i]->win;
-                        }
-                      else if (!lst[i]->floating)
-                        {
-                           wnum++;
-                           wl = Erealloc(wl, sizeof(Window) * wnum);
-                           wl[wnum - 1] = lst[i]->win;
-                        }
+                      wnum++;
+                      wl = Erealloc(wl, sizeof(Window) * wnum);
+                      wl[wnum - 1] = ewin->win;
+                   }
+                 else if (!ewin->floating)
+                   {
+                      wnum++;
+                      wl = Erealloc(wl, sizeof(Window) * wnum);
+                      wl[wnum - 1] = ewin->win;
                    }
               }
 
@@ -326,28 +327,27 @@
             /* move the windows to their final positions */
             for (i = 0; i < num; i++)
               {
-                 if ((lst[i]->desktop == desks.current) && (!lst[i]->sticky)
-                     && (!lst[i]->fixedpos))
-                   {
-                      if (!lst[i]->floating)
-                        {
-                           char                setflip = 0;
+                 char                setflip = 0;
 
-                           a1 = lst[i]->area_x;
-                           a2 = lst[i]->area_y;
-                           if (!Mode.flipp)
-                             {
-                                setflip = 1;
-                                Mode.flipp = 1;
-                             }
-                           MoveEwin(lst[i], lst[i]->x - dx, lst[i]->y - dy);
-                           if (setflip)
-                              Mode.flipp = 0;
-                           lst[i]->area_x = a1;
-                           lst[i]->area_y = a2;
-                           HintsSetWindowArea(lst[i]);
-                        }
+                 ewin = lst[i];
+                 if (ewin->desktop != desks.current || ewin->sticky ||
+                     ewin->fixedpos || ewin->floating ||
+                     ewin->client.transient_for)
+                    continue;
+
+                 a1 = ewin->area_x;
+                 a2 = ewin->area_y;
+                 if (!Mode.flipp)
+                   {
+                      setflip = 1;
+                      Mode.flipp = 1;
                    }
+                 MoveEwin(ewin, ewin->x - dx, ewin->y - dy);
+                 if (setflip)
+                    Mode.flipp = 0;
+                 ewin->area_x = a1;
+                 ewin->area_y = a2;
+                 HintsSetWindowArea(ewin);
               }
          }
        else
@@ -355,39 +355,40 @@
             /* move all windows across.... */
             for (i = 0; i < num; i++)
               {
-                 if ((lst[i]->desktop == desks.current) && (!lst[i]->sticky)
-                     && (!lst[i]->fixedpos))
+                 ewin = lst[i];
+                 if (ewin->desktop != desks.current || ewin->sticky ||
+                     ewin->fixedpos)
+                    continue;
+
+                 /* if we're moving this window and its not opaque move */
+                 /* warp it across without remebering the xy stuff */
+                 /* well work out the xy stuff later when the move finishes */
+                 if (ewin->floating)
                    {
-                      /* if we're moving this window and its not opaque move */
-                      /* warp it across without remebering the xy stuff */
-                      /* well work out the xy stuff later when the move finishes */
-                      if (lst[i]->floating)
+                      if (Conf.movemode > 0)
                         {
-                           if (Conf.movemode > 0)
-                             {
-                                GetWinXY(lst[i]->win, &x, &y);
-                                EMoveWindow(disp, lst[i]->win, x - dx, y - dy);
-                             }
+                           GetWinXY(ewin->win, &x, &y);
+                           EMoveWindow(disp, ewin->win, x - dx, y - dy);
                         }
-                      /* if we're not moving it... move it across */
-                      else
-                        {
-                           char                setflip = 0;
+                   }
+                 /* if we're not moving it... move it across */
+                 else if (!ewin->client.transient_for)
+                   {
+                      char                setflip = 0;
 
-                           a1 = lst[i]->area_x;
-                           a2 = lst[i]->area_y;
-                           if (!Mode.flipp)
-                             {
-                                setflip = 1;
-                                Mode.flipp = 1;
-                             }
-                           MoveEwin(lst[i], lst[i]->x - dx, lst[i]->y - dy);
-                           if (setflip)
-                              Mode.flipp = 0;
-                           lst[i]->area_x = a1;
-                           lst[i]->area_y = a2;
-                           HintsSetWindowArea(lst[i]);
+                      a1 = ewin->area_x;
+                      a2 = ewin->area_y;
+                      if (!Mode.flipp)
+                        {
+                           setflip = 1;
+                           Mode.flipp = 1;
                         }
+                      MoveEwin(ewin, ewin->x - dx, ewin->y - dy);
+                      if (setflip)
+                         Mode.flipp = 0;
+                      ewin->area_x = a1;
+                      ewin->area_y = a2;
+                      HintsSetWindowArea(ewin);
                    }
               }
          }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -3 -r1.152 -r1.153
--- borders.c   22 Mar 2004 16:42:31 -0000      1.152
+++ borders.c   22 Mar 2004 16:46:52 -0000      1.153
@@ -1683,6 +1683,10 @@
       EDBUG_RETURN_;
    call_depth++;
 
+   if (EventDebug(EDBUG_TYPE_MOVERESIZE))
+      printf("doMoveResizeEwin %#lx %d+%d %d*%d %d %s\n",
+            ewin->client.win, x, y, w, h, flags, EwinGetTitle(ewin));
+
    if (Mode.mode == MODE_NONE)
      {
        /* Don't throw windows offscreen */




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to