Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


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


Log Message:
Fix area updates (caused incorrect area switch on transient pop-up).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -3 -r1.295 -r1.296
--- E.h 29 Jun 2004 08:52:40 -0000      1.295
+++ E.h 29 Jun 2004 09:31:40 -0000      1.296
@@ -1778,6 +1778,7 @@
                                int speed);
 void                SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx,
                                 int *ty, int num_wins, int speed);
+void                EwinDetermineArea(EWin * ewin);
 void                AddToFamily(Window win);
 EWin               *AddInternalToFamily(Window win, const char *bname, int type,
                                        void *ptr,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -3 -r1.202 -r1.203
--- borders.c   28 Jun 2004 23:37:55 -0000      1.202
+++ borders.c   29 Jun 2004 09:31:40 -0000      1.203
@@ -44,7 +44,6 @@
 
 static void         EwinSetBorderInit(EWin * ewin);
 static void         EwinSetBorderTo(EWin * ewin, Border * b);
-static void         DetermineEwinArea(EWin * ewin);
 static EWin        *EwinCreate(Window win);
 static EWin        *Adopt(Window win);
 static EWin        *AdoptInternal(Window win, Border * border, int type);
@@ -325,6 +324,30 @@
 }
 
 void
+EwinDetermineArea(EWin * ewin)
+{
+   int                 ax, ay;
+
+   EDBUG(4, "EwinDetermineArea");
+
+   ax = (ewin->x + (ewin->w / 2) +
+        (desks.desk[ewin->desktop].current_area_x * VRoot.w)) / VRoot.w;
+   ay = (ewin->y + (ewin->h / 2) +
+        (desks.desk[ewin->desktop].current_area_y * VRoot.h)) / VRoot.h;
+
+   AreaFix(&ax, &ay);
+
+   if (ax != ewin->area_x || ay != ewin->area_y)
+     {
+       ewin->area_x = ax;
+       ewin->area_y = ay;
+       HintsSetWindowArea(ewin);
+     }
+
+   EDBUG_RETURN_;
+}
+
+void
 AddToFamily(Window win)
 {
    EWin               *ewin, *ewin2;
@@ -626,7 +649,7 @@
    /* send synthetic configure notifies and configure the window */
    ICCCM_Configure(ewin);
 
-   DetermineEwinArea(ewin);
+   EwinDetermineArea(ewin);
    UngrabX();
 
    EDBUG_RETURN_;
@@ -662,7 +685,7 @@
    ICCCM_Configure(ewin);
    EwinBorderDraw(ewin, 1, 1);
 
-   DetermineEwinArea(ewin);
+   EwinDetermineArea(ewin);
    UngrabX();
 
    EDBUG_RETURN(ewin);
@@ -1779,7 +1802,7 @@
    if (!ewin)
       return;
 
-   DetermineEwinArea(ewin);
+   EwinDetermineArea(ewin);
 
    if (Conf.theme.transparency)
       EwinBorderDraw(ewin, 1, 0);      /* Update the border */
@@ -3207,36 +3230,6 @@
    HintsSetWindowState(ewin);
 }
 
-static void
-EwinSetArea(EWin * ewin, int ax, int ay)
-{
-   if (ax == ewin->area_x && ay == ewin->area_y)
-      return;
-
-   ewin->area_x = ax;
-   ewin->area_y = ay;
-
-   HintsSetWindowArea(ewin);
-}
-
-static void
-DetermineEwinArea(EWin * ewin)
-{
-   int                 ax, ay;
-
-   EDBUG(4, "DetermineEwinArea");
-
-   ax = (ewin->x + (ewin->w / 2) +
-        (desks.desk[ewin->desktop].current_area_x * VRoot.w)) / VRoot.w;
-   ay = (ewin->y + (ewin->h / 2) +
-        (desks.desk[ewin->desktop].current_area_y * VRoot.h)) / VRoot.h;
-
-   AreaFix(&ax, &ay);
-   EwinSetArea(ewin, ax, ay);
-
-   EDBUG_RETURN_;
-}
-
 void
 MoveEwinToArea(EWin * ewin, int ax, int ay)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- desktops.c  28 Jun 2004 18:22:02 -0000      1.92
+++ desktops.c  29 Jun 2004 09:31:42 -0000      1.93
@@ -655,6 +655,7 @@
      {
        MoveEwin(ewin, ewin->x, ewin->y);
      }
+   EwinDetermineArea(ewin);
    HintsSetWindowDesktop(ewin);
    EDBUG_RETURN_;
 }




-------------------------------------------------------
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