if (!(max & E_MAXIMIZE_DIRECTION)) max |= E_MAXIMIZE_BOTH;
if ((ec->shaded) || (ec->shading)) return;
- evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
+
/* Only allow changes in vertical/ horizontal maximization */
if (((ec->maximized & E_MAXIMIZE_DIRECTION) == (max & E_MAXIMIZE_DIRECTION)) ||
((ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
return;
}
+ evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
+
if (ec->fullscreen)
e_client_unfullscreen(ec);
ec->pre_res_change.valid = 0;
}
if ((ec->shaded) || (ec->shading)) return;
- evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
+
/* Remove directions not used */
max &= (ec->maximized & E_MAXIMIZE_DIRECTION);
/* Can only remove existing maximization directions */
if (!max) return;
+
+ evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
+
if (ec->maximized & E_MAXIMIZE_TYPE)
{
ec->pre_res_change.valid = 0;