discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=687b5fb6b69f4847c2d68aa0d047955d771ca873

commit 687b5fb6b69f4847c2d68aa0d047955d771ca873
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Apr 4 14:02:39 2016 -0400

    set maximizing flag during maximize resizing for wl clients
    
    a helpful indicator for when to avoid potentially leaking positioning info
---
 src/bin/e_comp_wl.c | 27 +++++++++++++++++++++++++--
 src/bin/e_comp_wl.h |  1 +
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 8a4009e..f47cc1f 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -588,6 +588,15 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_U
 }
 
 static void
+_e_comp_wl_evas_cb_maximize_pre(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   E_Client *ec = data;
+
+   if (!e_object_is_del(E_OBJECT(ec)))
+     ec->comp_data->maximizing = 1;
+}
+
+static void
 _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 {
    E_Client *ec;
@@ -662,6 +671,16 @@ _e_comp_wl_evas_cb_state_update(void *data, Evas_Object 
*obj EINA_UNUSED, void *
 }
 
 static void
+_e_comp_wl_evas_cb_maximize_done(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
+{
+   E_Client *ec = data;
+
+   if (e_object_is_del(E_OBJECT(ec))) return;
+   ec->comp_data->maximizing = 0;
+   _e_comp_wl_evas_cb_state_update(ec, NULL, NULL);
+}
+
+static void
 _e_comp_wl_evas_cb_delete_request(void *data, Evas_Object *obj EINA_UNUSED, 
void *event EINA_UNUSED)
 {
    E_Client *ec = data;
@@ -783,10 +802,14 @@ _e_comp_wl_client_evas_init(E_Client *ec)
      {
         evas_object_smart_callback_add(ec->frame, "client_resize",
                                        _e_comp_wl_evas_cb_resize, ec);
+        evas_object_smart_callback_add(ec->frame, "maximize_pre",
+                                       _e_comp_wl_evas_cb_maximize_pre, ec);
+        evas_object_smart_callback_add(ec->frame, "unmaximize_pre",
+                                       _e_comp_wl_evas_cb_maximize_pre, ec);
         evas_object_smart_callback_add(ec->frame, "maximize_done",
-                                       _e_comp_wl_evas_cb_state_update, ec);
+                                       _e_comp_wl_evas_cb_maximize_done, ec);
         evas_object_smart_callback_add(ec->frame, "unmaximize_done",
-                                       _e_comp_wl_evas_cb_state_update, ec);
+                                       _e_comp_wl_evas_cb_maximize_done, ec);
         evas_object_smart_callback_add(ec->frame, "fullscreen",
                                        _e_comp_wl_evas_cb_state_update, ec);
         evas_object_smart_callback_add(ec->frame, "unfullscreen",
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index d6a52d3..84fbd48 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -314,6 +314,7 @@ struct _E_Comp_Wl_Client_Data
    Eina_Bool frame_update : 1;
    Eina_Bool cursor : 1;
    Eina_Bool moved : 1;
+   Eina_Bool maximizing : 1;
 };
 
 struct _E_Comp_Wl_Output

-- 


Reply via email to