diff --git a/lib/awful/client/shape.lua b/lib/awful/client/shape.lua index e51d873a1..f688b8c51 100644 --- a/lib/awful/client/shape.lua +++ b/lib/awful/client/shape.lua @@ -85,8 +85,8 @@ end capi.client.connect_signal("property::shape_client_bounding", shape.update.bounding) capi.client.connect_signal("property::shape_client_clip", shape.update.clip) -capi.client.connect_signal("property::width", shape.update.all) -capi.client.connect_signal("property::height", shape.update.all) +capi.client.connect_signal("property::size", shape.update.all) +capi.client.connect_signal("property::border_width", shape.update.all) return shape diff --git a/objects/client.c b/objects/client.c index ec4ab424b..159e554dc 100644 --- a/objects/client.c +++ b/objects/client.c @@ -733,6 +733,16 @@ * @param tag */ +/** When the height or width changed. + * @signal property::size + * @see client.geometry + */ + +/** When the x or y coordinate changed. + * @signal property::position + * @see client.geometry + */ + /** * The border color when the client is focused. * @@ -1647,14 +1657,22 @@ client_resize_do(client_t *c, area_t geometry) luaA_object_push(L, c); if (!AREA_EQUAL(old_geometry, geometry)) luaA_object_emit_signal(L, -1, "property::geometry", 0); - if (old_geometry.x != geometry.x) - luaA_object_emit_signal(L, -1, "property::x", 0); - if (old_geometry.y != geometry.y) - luaA_object_emit_signal(L, -1, "property::y", 0); - if (old_geometry.width != geometry.width) - luaA_object_emit_signal(L, -1, "property::width", 0); - if (old_geometry.height != geometry.height) - luaA_object_emit_signal(L, -1, "property::height", 0); + if (old_geometry.x != geometry.x || old_geometry.y != geometry.y) + { + luaA_object_emit_signal(L, -1, "property::position", 0); + if (old_geometry.x != geometry.x) + luaA_object_emit_signal(L, -1, "property::x", 0); + else + luaA_object_emit_signal(L, -1, "property::y", 0); + } + if (old_geometry.width != geometry.width || old_geometry.height != geometry.height) + { + luaA_object_emit_signal(L, -1, "property::size", 0); + if (old_geometry.width != geometry.width) + luaA_object_emit_signal(L, -1, "property::width", 0); + else + luaA_object_emit_signal(L, -1, "property::height", 0); + } lua_pop(L, 1); screen_client_moveto(c, new_screen, false);