From 438a10973baf5793ea8089200968694e50775201 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 14 Oct 2015 19:35:23 +0200 Subject: [PATCH] Add property::geometry to drawin/drawable [#411] Signed-off-by: Uli Schlachter --- objects/drawable.c | 5 +++++ objects/drawin.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/objects/drawable.c b/objects/drawable.c index dff780ec..331a29c0 100644 --- a/objects/drawable.c +++ b/objects/drawable.c @@ -104,6 +104,7 @@ drawable_set_geometry(lua_State *L, int didx, area_t geom) luaA_object_emit_signal(L, didx, "property::surface", 0); } + luaA_object_emit_signal(L, didx, "property::geometry", 0); if (old.x != geom.x) luaA_object_emit_signal(L, didx, "property::x", 0); if (old.y != geom.y) @@ -202,6 +203,10 @@ drawable_class_setup(lua_State *L) * @signal mouse::move */ signal_add(&drawable_class.signals, "mouse::move"); + /** + * @signal property::geometry + */ + signal_add(&drawable_class.signals, "property::geometry"); /** * @signal property::height */ diff --git a/objects/drawin.c b/objects/drawin.c index e10f349b..c75ce1d5 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -188,6 +188,7 @@ drawin_moveresize(lua_State *L, int udx, area_t geometry) w->geometry_dirty = true; drawin_update_drawing(L, udx); + luaA_object_emit_signal(L, udx, "property::geometry", 0); if (old_geometry.x != w->geometry.x) luaA_object_emit_signal(L, udx, "property::x", 0); if (old_geometry.y != w->geometry.y) @@ -690,6 +691,10 @@ drawin_class_setup(lua_State *L) (lua_class_propfunc_t) luaA_drawin_get_shape_clip, (lua_class_propfunc_t) luaA_drawin_set_shape_clip); + /** + * @signal property::geometry + */ + signal_add(&drawin_class.signals, "property::geometry"); /** * @signal property::shape_bounding */