Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_place.c 


Log Message:


and handle corner case for fulslcreen sized windows in auto-place. oops.
openoffice doesnt even get auto-placed. it explicitly asks for its own
placement and size. it's just badly behaved.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_place.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- e_place.c   19 Sep 2007 23:59:10 -0000      1.26
+++ e_place.c   20 Sep 2007 00:17:39 -0000      1.27
@@ -160,18 +160,16 @@
    E_Border_List      *bl;
    E_Border           *bd;
 
-#if 0
-   /* DISABLE placement entirely for speed testing */
    *rx = x;
    *ry = y;
+#if 0
+   /* DISABLE placement entirely for speed testing */
    return 1;
 #endif
 
    if ((w <= 0) || (h <= 0))
      {
        printf("EEEK! trying to place 0x0 window!!!!\n");
-       *rx = x;
-       *ry = y;
        return 1;
      }
    
@@ -378,8 +376,8 @@
        {
           for (i = 0; i < a_w - 1; i++)
             {
-               if ((a_x[i] < (zw - w)) &&
-                   (a_y[j] < (zh - h)))
+               if ((a_x[i] <= (zw - w)) &&
+                   (a_y[j] <= (zh - h)))
                  {
                     int ar = 0;
 
@@ -398,7 +396,7 @@
                          if (ar == 0) goto done;
                       }
                  }
-               if ((a_x[i + 1] - w > 0) && (a_y[j] < (zh - h)))
+               if ((a_x[i + 1] - w > 0) && (a_y[j] <= (zh - h)))
                  {
                     int ar = 0;
 
@@ -436,7 +434,7 @@
                          if (ar == 0) goto done;
                       }
                  }
-               if ((a_x[i] < (zw - w)) && (a_y[j + 1] - h > 0))
+               if ((a_x[i] <= (zw - w)) && (a_y[j + 1] - h > 0))
                  {
                     int ar = 0;
 
@@ -461,11 +459,13 @@
  done:
    E_FREE(a_x);
    E_FREE(a_y);
-   
+
    if ((*rx + w) > zone->w) *rx = zone->w - w;
    if (*rx < 0) *rx = 0;
    if ((*ry + h) > zone->h) *ry = zone->h - h;
    if (*ry < 0) *ry = 0;
+
+   printf("0 - PLACE %i %i | %ix%i\n", *rx, *ry, w, h);
    
    *rx += zone->x;
    *ry += zone->y;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to