From: Doyoun Kang <doyoun.kang@samsung.com>
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 3 Jul 2012 06:31:43 +0000 (06:31 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 3 Jul 2012 06:31:43 +0000 (06:31 +0000)
Subject: [E-devel] [Patch][e] add code to check
e_config->geometry_auto_move before moving a window in e_border.c

In e, there is a configuration value - geometry_auto_move - which
determines whether e moves the window to useful geometry automatically or not.
In my opinion, if this is 0, then e doesn't move the window
automatically. However, e always moves the window automatically
because there is no code to check the geometry_auto_move value in
_e_border_eval(). So, I added code to check
e_config->geometry_auto_move in _e_border_eval().

SVN revision: 73191

src/bin/e_border.c

index 604595d..0c869d9 100644 (file)
@@ -7705,20 +7705,28 @@ _e_border_eval(E_Border *bd)
               * are moved to useful positions.
               */
              // ->
-             if (bd->x < zx)
-               bd->x = zx;
+             if (e_config->geometry_auto_move)
+               {
+                  if (bd->x < zx)
+                    bd->x = zx;
 
-             if (bd->y < zy)
-               bd->y = zy;
+                  if (bd->y < zy)
+                    bd->y = zy;
 
-             if (bd->x + bd->w > zx + zw)
-               bd->x = zx + zw - bd->w;
+                  if (bd->x + bd->w > zx + zw)
+                    bd->x = zx + zw - bd->w;
 
-             if (bd->y + bd->h > zy + zh)
-               bd->y = zy + zh - bd->h;
-             // <--
+                  if (bd->y + bd->h > zy + zh)
+                    bd->y = zy + zh - bd->h;
+                  // <--
 
-             if (bd->zone && e_container_zone_at_point_get(bd->zone->container, bd->x, bd->y))
+                  if (bd->zone && e_container_zone_at_point_get(bd->zone->container, bd->x, bd->y))
+                    {
+                       bd->changes.pos = 1;
+                       bd->placed = 1;
+                    }
+               }
+             else
                {
                   bd->changes.pos = 1;
                   bd->placed = 1;