discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3c436b5c09ac43053f17b6c8401be894ae5f8d72

commit 3c436b5c09ac43053f17b6c8401be894ae5f8d72
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Feb 3 13:03:01 2014 -0500

    bugfix: initial client positioning with multiple monitors improved
    
    this was added a while ago to fix positioning of windows that wanted to 
start centered but couldn't accurately calculate xinerama screen sizes, 
resulting in windows getting centered across the screen split. it ended up 
being a bit too aggressive, however.
---
 src/bin/e_comp_x.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 1db5cc4..614e94a 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -3219,7 +3219,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client 
*ec)
                          ec->y = zy + zh - ec->h;
 
                        // <--
-                       if (ec->zone && e_comp_zone_xy_get(ec->comp, ec->x, 
ec->y))
+                       if (e_comp_zone_xy_get(ec->comp, ec->x, ec->y))
                          {
                             if (!E_INSIDE(ec->x, ec->y, ec->zone->x, 
ec->zone->y, ec->zone->w, ec->zone->h))
                               {
@@ -3229,14 +3229,11 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, 
E_Client *ec)
                             /* some application failing to correctly center a 
window */
                             if (eina_list_count(ec->comp->zones) > 1)
                               {
-                                 if (((abs((ec->comp->man->w / 2) - ec->x) < 
3) || //ec->x is center of manager
-                                      ((abs((ec->comp->man->w / 2) - ec->x - 
ec->w) < 3) || //ec->x - ec->w is center of manager
-                                       (abs((ec->comp->man->w / 2) - ec->x - 
(ec->w / 2)) < 3))) || //ec->x - ec->w/2 is center of manager
-                                     ((abs((ec->comp->man->h / 2) - ec->y) < 
3) || //ec->y is center of manager
-                                      ((abs((ec->comp->man->h / 2) - ec->y - 
ec->h) < 3) || //ec->y - ec->h is center of manager
-                                       (abs((ec->comp->man->h / 2) - ec->y - 
(ec->h / 2)) < 3))) //ec->y - ec->h/2 is center of manager
-                                     )
-                                   e_comp_object_util_center(ec->frame);
+                                 if (abs((ec->comp->man->w / 2) - ec->x - 
(ec->w / 2)) < 3)
+                                   ec->x = ((ec->zone->x + ec->zone->w) / 2) - 
(ec->w / 2);
+                                 if (abs((ec->comp->man->h / 2) - ec->y - 
(ec->h / 2)) < 3)
+                                   ec->y = ((ec->zone->y + ec->zone->h) / 2) - 
(ec->h / 2);
+                                 e_client_zone_set(ec, 
e_comp_zone_xy_get(ec->comp, ec->x, ec->y));
                               }
                             ec->changes.pos = 1;
                             ec->placed = 1;

-- 


Reply via email to