req_window_oversize:

If a window likes to open with bigger 
initial coordinates bigger than the screen 
(minus ignore zones like not overlap allowed shelfes) 
the window should be sized to the maximum allowed size.

SVN revision: 50028
This commit is contained in:
Andreas Volz 2010-07-04 19:10:09 +00:00
parent e8d69bde2f
commit c86c1144fe
1 changed files with 23 additions and 0 deletions

View File

@ -6447,11 +6447,34 @@ _e_border_eval(E_Border *bd)
if (bd->new_client)
{
int zx, zy, zw, zh;
int rw, rh;
zx = zy = zw = zh = 0;
if (bd->zone)
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
/*
* Limit maximum size of windows to useful geometry
*/
// ->
if (bd->w > zw)
rw = zw;
else
rw = bd->w;
if (bd->h > zh)
rh = zh;
else
rh = bd->h;
if ((rw != bd->w) || (rh != bd->h))
{
bd->w = rw;
bd->h = rh;
e_border_resize (bd, bd->w, bd->h);
}
// <-
if (bd->re_manage)
{
bd->x -= bd->client_inset.l;