aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-10-19 13:26:51 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-10-25 10:44:16 -0400
commited30f41de82515d130f0d861e922f9e3f45a7aaf (patch)
treecaee7f914d44a8f00f2bed6ea9f9c5433bcbb02a /src/lib/efl_wl
parentefl_wl: add function for returning the evas object for an extracted surface (diff)
downloadefl-ed30f41de82515d130f0d861e922f9e3f45a7aaf.tar.gz
wayland: add support for efl weight hint propagation from elm_win to efl_wl
@feature
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/efl_wl.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 7e76d2a765..de86613a9f 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -326,6 +326,7 @@ struct Comp_Surface
Eina_Bool dead : 1;
Eina_Bool commit : 1;
Eina_Bool extracted : 1;
+ Eina_Bool hint_set_weight : 1;
};
struct Comp_Subsurface
@@ -4997,9 +4998,18 @@ hints_set_aspect(struct wl_client *client, struct wl_resource *resource, struct
shell_surface_aspect_update(cs);
}
+static void
+hints_set_weight(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface, int w, int h)
+{
+ Comp_Surface *cs = wl_resource_get_user_data(surface);
+ cs->hint_set_weight = 1;
+ evas_object_size_hint_weight_set(cs->obj, w / 100., h / 100.);
+}
+
static const struct efl_hints_interface hints_interface =
{
hints_set_aspect,
+ hints_set_weight,
};
static void
@@ -5496,7 +5506,7 @@ efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set)
}
}
-EAPI void *
+void *
efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb)
{
Comp *c;
@@ -5543,7 +5553,7 @@ extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
shell_surface_send_configure(data);
}
-EAPI Eina_Bool
+Eina_Bool
efl_wl_surface_extract(Evas_Object *surface)
{
Comp_Surface *cs;