summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-06-20 15:57:19 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-06-20 16:04:10 -0400
commit9a9c09f514d02edf7feb6770cefacf0b3f77f2be (patch)
treebcd23f91ec645e2ba56a1bee117da3b9b2b08617
parentb5ef8766f40d95627c7b000bfacbcf4409ce6f1a (diff)
downloadenlightenment-9a9c09f514d02edf7feb6770cefacf0b3f77f2be.tar.gz
do not change E_Client->saved values during maximize if need_maximize is set
this is indicative of a deferred maximize, so don't re-set it and screw up previously-set values
-rw-r--r--src/bin/e_client.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 0255ccb212..9110daa75c 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -3798,6 +3798,18 @@ e_client_maximize(E_Client *ec, E_Maximize max)
((ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
if (ec->new_client)
{
+ if (!(ec->maximized & E_MAXIMIZE_HORIZONTAL))
+ {
+ /* Horizontal hasn't been set */
+ ec->saved.x = ec->client.x - ec->zone->x;
+ ec->saved.w = ec->client.w;
+ }
+ if (!(ec->maximized & E_MAXIMIZE_VERTICAL))
+ {
+ /* Vertical hasn't been set */
+ ec->saved.y = ec->client.y - ec->zone->y;
+ ec->saved.h = ec->client.h;
+ }
ec->changes.need_maximize = 1;
ec->maximized &= ~E_MAXIMIZE_TYPE;
ec->maximized |= max;
@@ -3813,14 +3825,18 @@ e_client_maximize(E_Client *ec, E_Maximize max)
if (!(ec->maximized & E_MAXIMIZE_HORIZONTAL))
{
/* Horizontal hasn't been set */
- ec->saved.x = ec->client.x - ec->zone->x;
- ec->saved.w = ec->client.w;
+ if ((!ec->changes.need_maximize) || (!ec->saved.x))
+ ec->saved.x = ec->client.x - ec->zone->x;
+ if ((!ec->changes.need_maximize) || (!ec->saved.w))
+ ec->saved.w = ec->client.w;
}
if (!(ec->maximized & E_MAXIMIZE_VERTICAL))
{
/* Vertical hasn't been set */
- ec->saved.y = ec->client.y - ec->zone->y;
- ec->saved.h = ec->client.h;
+ if ((!ec->changes.need_maximize) || (!ec->saved.y))
+ ec->saved.y = ec->client.y - ec->zone->y;
+ if ((!ec->changes.need_maximize) || (!ec->saved.h))
+ ec->saved.h = ec->client.h;
}
ec->saved.zone = ec->zone->num;