From 39a39a41c837f31b691a9cef6a1810bdd43d6e9b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 24 Sep 2015 15:46:39 -0400 Subject: [PATCH] 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 c42ec47d0..52401b8a1 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 b13a63a33..7c9bbe0b2 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);