handle "unmaximize" smart callback differently depending on fullscreen state

this is a bit hacky, but it seems to provide accurate results to fix more maximize bugs

ref c29157189f
This commit is contained in:
Mike Blumenkrantz 2016-10-04 09:18:28 -04:00
parent 1afddc3b5e
commit e20b439020
1 changed files with 5 additions and 1 deletions

View File

@ -3950,6 +3950,7 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
{
int w, h, x, y;
Eina_Bool horiz = EINA_FALSE, vert = EINA_FALSE;
Eina_Bool fullscreen = !!eina_list_data_find(ec->desk->fullscreen_clients, ec);
e_client_unmaximize_geometry_get(ec, max, &x, &y, &w, &h);
if (max & E_MAXIMIZE_VERTICAL)
@ -3982,6 +3983,8 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
}
if (e_config->window_maximize_animate && (!ec->maximize_anims_disabled))
ec->maximize_override = 1;
if (!fullscreen)
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
e_client_resize_limit(ec, &w, &h);
if (ec->saved.frame &&
(e_comp_object_frame_exists(ec->frame) || (!e_comp_object_frame_allowed(ec->frame))))
@ -3989,7 +3992,8 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
e_comp_object_frame_xy_adjust(ec->frame, x, y, &x, &y);
e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h);
}
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
if (fullscreen)
evas_object_smart_callback_call(ec->frame, "unmaximize", NULL);
if (!_e_client_maximize_run(ec, x, y, w, h))
ec->maximize_override = 0;
if (vert)