From: Doyoun Kang Date: Fri, 21 Oct 2022 05:57:37 +0000 (+0900) Subject: e_client: modify code to call maximize_pre/unmaximize_pre callback X-Git-Tag: accepted/tizen/unified/20221102.172739~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7ca4430b22288ab4f11882542c0dc41e02ebdbd;p=platform%2Fupstream%2Fenlightenment.git e_client: modify code to call maximize_pre/unmaximize_pre callback There is a bug that the maximize_done/unmaximize_done evas_object_smart_callback doesn't call after calling maximize_pre/unmaximize_pre evas_object_smart_callback in some case. This resolve this problem Change-Id: I6d30dc2897b441574c92f46d68e77e3501e412b1 --- diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 1e696e541a..d27ea063c7 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -6099,7 +6099,7 @@ e_client_maximize(E_Client *ec, E_Maximize max) 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; @@ -6112,6 +6112,8 @@ e_client_maximize(E_Client *ec, E_Maximize max) return; } + evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL); + if (ec->fullscreen) e_client_unfullscreen(ec); ec->pre_res_change.valid = 0; @@ -6169,11 +6171,14 @@ e_client_unmaximize(E_Client *ec, E_Maximize max) } 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;