Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c 


Log Message:
If the aspect is wrong, never increase the size of the window.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.364
retrieving revision 1.365
diff -u -3 -r1.364 -r1.365
--- e_border.c  22 Aug 2005 04:16:25 -0000      1.364
+++ e_border.c  22 Aug 2005 15:46:14 -0000      1.365
@@ -1356,14 +1356,14 @@
 
        bd->layer = 200;
        e_border_raise(bd);
-       x = bd->zone->x - bd->client_inset.l;
-       y = bd->zone->y - bd->client_inset.t;
-       w = bd->zone->w + bd->client_inset.l + bd->client_inset.r;
-       h = bd->zone->h + bd->client_inset.t + bd->client_inset.b;
+       x = bd->zone->x;
+       y = bd->zone->y;
+       w = bd->zone->w;
+       h = bd->zone->h;
        _e_border_resize_limit(bd, &w, &h);
        /* center */
-       x = x + (bd->zone->w + bd->client_inset.l + bd->client_inset.r - w) / 2;
-       y = y + (bd->zone->h + bd->client_inset.t + bd->client_inset.b - h) / 2;
+       x = x + (bd->zone->w - w) / 2;
+       y = y + (bd->zone->h - h) / 2;
        e_border_move_resize(bd, x, y, w, h);
        ecore_evas_hide(bd->bg_ecore_evas);
 
@@ -5027,11 +5027,11 @@
        if ((bd->client.icccm.min_aspect != 0.0) &&
            (a < bd->client.icccm.min_aspect))
          {
-            tw = th * bd->client.icccm.min_aspect;
-            *w = tw + bd->client.icccm.base_w;
+            th = tw / bd->client.icccm.max_aspect;
+            *h = th + bd->client.icccm.base_h;
          }
        else if ((bd->client.icccm.max_aspect != 0.0) &&
-          (a > bd->client.icccm.max_aspect))
+                (a > bd->client.icccm.max_aspect))
          {
             th = tw / bd->client.icccm.max_aspect;
             *h = th + bd->client.icccm.base_h;
@@ -5042,10 +5042,9 @@
        a = (double)*w / (double)*h;
        if ((bd->client.icccm.min_aspect != 0.0) &&
            (a < bd->client.icccm.min_aspect))
-         *w = *h * bd->client.icccm.min_aspect;
-       else if
-         ((bd->client.icccm.max_aspect != 0.0) &&
-          (a > bd->client.icccm.max_aspect))
+         *h = *w / bd->client.icccm.min_aspect;
+       else if ((bd->client.icccm.max_aspect != 0.0) &&
+                (a > bd->client.icccm.max_aspect))
          *h = *w / bd->client.icccm.max_aspect;
      }
    if (bd->client.icccm.base_w >= 0)




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to