discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=71c1669036a9f62b296191ef6c44cb7464488c6e

commit 71c1669036a9f62b296191ef6c44cb7464488c6e
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Apr 8 12:22:47 2016 -0400

    change client un/maximize_pre callback location to occur after safety checks
---
 src/bin/e_client.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index b13dc32..59f8cb7 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -3766,7 +3766,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;
@@ -3778,7 +3778,7 @@ e_client_maximize(E_Client *ec, E_Maximize max)
         EC_CHANGED(ec);
         return;
      }
-
+   evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
    if (ec->fullscreen)
      e_client_unfullscreen(ec);
    ec->pre_res_change.valid = 0;
@@ -3836,9 +3836,10 @@ 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);
+   evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
    /* Can only remove existing maximization directions */
    if (!max) return;
    if (ec->maximized & E_MAXIMIZE_TYPE)

-- 


Reply via email to