discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=39a39a41c837f31b691a9cef6a1810bdd43d6e9b

commit 39a39a41c837f31b691a9cef6a1810bdd43d6e9b
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Sep 24 15:46:39 2015 -0400

    add util function for determining if a client is allowed to have a frame
    
    returns false if mwm borderless is set or if csd exists
---
 src/bin/e_comp_object.c | 7 +++++++
 src/bin/e_comp_object.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index c42ec47..52401b8 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -2889,6 +2889,13 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int 
l, int r, int t, int b)
    cw->ec->h += t + b;
 }
 
+E_API Eina_Bool
+e_comp_object_frame_allowed(Evas_Object *obj)
+{
+   API_ENTRY EINA_FALSE;
+   return (!cw->ec->mwm.borderless) && (cw->frame_object || 
(!cw->client_inset.calc));
+}
+
 E_API void
 e_comp_object_frame_icon_geometry_get(Evas_Object *obj, int *x, int *y, int 
*w, int *h)
 {
diff --git a/src/bin/e_comp_object.h b/src/bin/e_comp_object.h
index b13a63a..7c9bbe0 100644
--- a/src/bin/e_comp_object.h
+++ b/src/bin/e_comp_object.h
@@ -53,6 +53,7 @@ E_API void e_comp_object_util_center(Evas_Object *obj);
 E_API void e_comp_object_util_center_on(Evas_Object *obj, Evas_Object *on);
 E_API void e_comp_object_util_center_pos_get(Evas_Object *obj, int *x, int *y);
 E_API void e_comp_object_util_fullscreen(Evas_Object *obj);
+E_API Eina_Bool e_comp_object_frame_allowed(Evas_Object *obj);
 E_API void e_comp_object_frame_geometry_get(Evas_Object *obj, int *l, int *r, 
int *t, int *b);
 E_API void e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, 
int t, int b);
 E_API void e_comp_object_frame_icon_geometry_get(Evas_Object *obj, int *x, int 
*y, int *w, int *h);

-- 


Reply via email to