discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=98934fb0e96bb2282b7c986c57314046547fbf3a

commit 98934fb0e96bb2282b7c986c57314046547fbf3a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Apr 8 16:07:40 2016 -0400

    make (un)maximize_pre callbacks capable of rejecting the maximize operation
    
    this is useful when subsystems need to know that a client wants to maximize
    but need to delay that maximize for a later point
---
 src/bin/e_client.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 1ab8f67..a37a427 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -3780,7 +3780,8 @@ e_client_maximize(E_Client *ec, E_Maximize max)
         EC_CHANGED(ec);
         return;
      }
-   evas_object_smart_callback_call(ec->frame, "maximize_pre", NULL);
+   evas_object_smart_callback_call(ec->frame, "maximize_pre", &max);
+   if (!max) return;
    override = ec->maximize_override;
    if (ec->fullscreen)
      e_client_unfullscreen(ec);
@@ -3899,7 +3900,7 @@ e_client_unmaximize(E_Client *ec, E_Maximize max)
 
    /* Remove directions not used */
    max &= (ec->maximized & E_MAXIMIZE_DIRECTION);
-   evas_object_smart_callback_call(ec->frame, "unmaximize_pre", NULL);
+   evas_object_smart_callback_call(ec->frame, "unmaximize_pre", &max);
    /* Can only remove existing maximization directions */
    if (!max) return;
    if (ec->maximized & E_MAXIMIZE_TYPE)

-- 


Reply via email to