e_client: modify code to call maximize_pre/unmaximize_pre callback 62/283262/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 21 Oct 2022 05:57:37 +0000 (14:57 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 21 Oct 2022 06:27:59 +0000 (15:27 +0900)
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

src/bin/e_client.c

index 1e696e5..d27ea06 100644 (file)
@@ -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;