Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c 


Log Message:


fix aspect hint handling

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_border.c  25 Nov 2004 15:39:11 -0000      1.5
+++ e_border.c  26 Nov 2004 06:15:02 -0000      1.6
@@ -1460,20 +1460,24 @@
    *h -= bd->client_inset.t + bd->client_inset.b;
    if (*h < 1) *h = 1;
    if (*w < 1) *w = 1;
-   a = *w / *h;
+   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;
+     *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.max_aspect;
+     *h = *w / bd->client.icccm.max_aspect;
    *w = bd->client.icccm.base_w + 
      (((*w - bd->client.icccm.base_w) / bd->client.icccm.step_w) *
       bd->client.icccm.step_w);
    *h = bd->client.icccm.base_h + 
      (((*h - bd->client.icccm.base_h) / bd->client.icccm.step_h) *
       bd->client.icccm.step_h);
+   
+   if (*h < 1) *h = 1;
+   if (*w < 1) *w = 1;
+   
    if      (*w > bd->client.icccm.max_w) *w = bd->client.icccm.max_w;
    else if (*w < bd->client.icccm.min_w) *w = bd->client.icccm.min_w;
    if      (*h > bd->client.icccm.max_h) *h = bd->client.icccm.max_h;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to