geometry_auto_move option (enabled by default) now also corrects applications which fail in their attempts to center windows on multimonitor systems

SVN revision: 82448
This commit is contained in:
Mike Blumenkrantz 2013-01-09 10:11:55 +00:00
parent dacb574ff4
commit 8096505844
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-01-09 Mike Blumenkrantz
* geometry_auto_move option now also corrects applications which fail in their attempts to center windows
2013-01-08 David H. Bronke
* Added new config option for disabling pointer warping when performing directional focus changes using winlist

1
NEWS
View File

@ -46,6 +46,7 @@ Improvements:
* Added elm win trap callback for base size setting, calling this causes ICCCM hints to be applied
* "System Default" language in wizard now displays which language it is and no longer removes language from list
* Desktop->Shelves menu now shows shelf names
* geometry_auto_move option now also corrects applications which fail in their attempts to center windows
Fixes:
* Force check changed upon confirmation dialog closure for engine settings.

View File

@ -8550,10 +8550,27 @@ _e_border_eval(E_Border *bd)
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 (!E_INSIDE(bd->x, bd->y, bd->zone->x, bd->zone->y, bd->zone->w, bd->zone->h))
{
bd->x = E_CLAMP(bd->x, bd->zone->x, bd->zone->x + bd->zone->w);
bd->y = E_CLAMP(bd->y, bd->zone->y, bd->zone->y + bd->zone->h);
}
/* some application failing to correctly center a window */
if (eina_list_count(bd->zone->container->zones) > 1)
{
if (((abs((bd->zone->container->w / 2) - bd->x) < 3) || //bd->x is center of container
((abs((bd->zone->container->w / 2) - bd->x - bd->w) < 3) || //bd->x - bd->w is center of container
(abs((bd->zone->container->w / 2) - bd->x - (bd->w / 2)) < 3))) || //bd->x - bd->w/2 is center of container
((abs((bd->zone->container->h / 2) - bd->y) < 3) || //bd->y is center of container
((abs((bd->zone->container->h / 2) - bd->y - bd->h) < 3) || //bd->y - bd->h is center of container
(abs((bd->zone->container->h / 2) - bd->y - (bd->h / 2)) < 3))) //bd->y - bd->h/2 is center of container
)
e_border_center(bd);
}
bd->changes.pos = 1;
bd->placed = 1;
}