From c86c1144fe6b733f7d05f10b22a6bb96b50eefc0 Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Sun, 4 Jul 2010 19:10:09 +0000 Subject: [PATCH] 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 --- src/bin/e_border.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 90daa0154..211151cf5 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -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;