From 7e5eb0a96d899dedf30b99eed3a2fcdea78075aa Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 28 Sep 2015 14:39:42 -0400 Subject: [PATCH] allow client resizes on axes currently unrestricted by maximize state if this isn't explicitly blocked by config options then allowing resizes on the unmaximized axes is necessary in order to avoid accidentally queuing a full unmaximize --- src/bin/e_comp_object.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 291e43dc0..8c00cf8a2 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -1013,13 +1013,30 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) if ((!e_config->allow_manip) && ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return; if ((!cw->ec->shading) && (!cw->ec->shaded)) { - cw->ec->changes.need_unmaximize = 1; - cw->ec->saved.w = iw; - cw->ec->saved.h = ih; - cw->ec->saved.x = cw->ec->client.x - cw->ec->zone->x; - cw->ec->saved.y = cw->ec->client.y - cw->ec->zone->y; - EC_CHANGED(cw->ec); - return; + Eina_Bool reject = EINA_FALSE; + if (cw->ec->maximized & E_MAXIMIZE_VERTICAL) + { + if (cw->ec->client.h != ih) + { + cw->ec->saved.h = ih; + cw->ec->saved.y = cw->ec->client.y - cw->ec->zone->y; + reject = cw->ec->changes.need_unmaximize = 1; + } + } + if (cw->ec->maximized & E_MAXIMIZE_HORIZONTAL) + { + if (cw->ec->client.w != iw) + { + cw->ec->saved.w = iw; + cw->ec->saved.x = cw->ec->client.x - cw->ec->zone->x; + reject = cw->ec->changes.need_unmaximize = 1; + } + } + if (reject) + { + EC_CHANGED(cw->ec); + return; + } } } if (cw->ec->new_client || (!cw->ec->visible) || (!cw->effect_obj))