only save client size info on maximize/fullscreen when protocol visible

a client which begins in one of these states must set its size again when
removing the state
This commit is contained in:
Mike Blumenkrantz 2017-03-10 15:57:15 -05:00
parent 5720338072
commit 5b9dec214e
1 changed files with 9 additions and 4 deletions

View File

@ -4064,12 +4064,14 @@ e_client_maximize(E_Client *ec, E_Maximize max)
{
/* Horizontal hasn't been set */
ec->saved.x = ec->client.x - ec->zone->x;
if (ec->visible)
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;
if (ec->visible)
ec->saved.h = ec->client.h;
}
@ -4293,9 +4295,12 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
{
ec->saved.x = ec->client.x - ec->zone->x;
ec->saved.y = ec->client.y - ec->zone->y;
if (ec->visible)
{
ec->saved.w = ec->client.w;
ec->saved.h = ec->client.h;
}
}
ec->saved.maximized = ec->maximized;
ec->saved.zone = ec->zone->num;
ec->saved.frame = e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame));