summaryrefslogtreecommitdiff
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
parente9572a653742f0e613905e47767ae116297928d3 (diff)
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
326 Eina_Bool dead : 1; 326 Eina_Bool dead : 1;
327 Eina_Bool commit : 1; 327 Eina_Bool commit : 1;
328 Eina_Bool extracted : 1; 328 Eina_Bool extracted : 1;
329 Eina_Bool hint_set_weight : 1;
329}; 330};
330 331
331struct Comp_Subsurface 332struct Comp_Subsurface
@@ -4997,9 +4998,18 @@ hints_set_aspect(struct wl_client *client, struct wl_resource *resource, struct
4997 shell_surface_aspect_update(cs); 4998 shell_surface_aspect_update(cs);
4998} 4999}
4999 5000
5001static void
5002hints_set_weight(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface, int w, int h)
5003{
5004 Comp_Surface *cs = wl_resource_get_user_data(surface);
5005 cs->hint_set_weight = 1;
5006 evas_object_size_hint_weight_set(cs->obj, w / 100., h / 100.);
5007}
5008
5000static const struct efl_hints_interface hints_interface = 5009static const struct efl_hints_interface hints_interface =
5001{ 5010{
5002 hints_set_aspect, 5011 hints_set_aspect,
5012 hints_set_weight,
5003}; 5013};
5004 5014
5005static void 5015static void
@@ -5496,7 +5506,7 @@ efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set)
5496 } 5506 }
5497} 5507}
5498 5508
5499EAPI void * 5509void *
5500efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb) 5510efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb)
5501{ 5511{
5502 Comp *c; 5512 Comp *c;
@@ -5543,7 +5553,7 @@ extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
5543 shell_surface_send_configure(data); 5553 shell_surface_send_configure(data);
5544} 5554}
5545 5555
5546EAPI Eina_Bool 5556Eina_Bool
5547efl_wl_surface_extract(Evas_Object *surface) 5557efl_wl_surface_extract(Evas_Object *surface)
5548{ 5558{
5549 Comp_Surface *cs; 5559 Comp_Surface *cs;