From 828543c838e293da9bc8c20d0dde0922806fcc29 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 31 Mar 2016 01:20:04 -0400 Subject: [PATCH] gears.object.properties: Support 'obj.is_something' Used when there a property is set by mutators instead of accessors. --- lib/gears/object/properties.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gears/object/properties.lua b/lib/gears/object/properties.lua index 7d05ca865..31b67f3fc 100644 --- a/lib/gears/object/properties.lua +++ b/lib/gears/object/properties.lua @@ -53,6 +53,8 @@ function object.capi_index_fallback(class, args) -- Look for a getter method if args.getter_class and args.getter_class[getter_prefix..prop] then return args.getter_class[getter_prefix..prop](cobj) + elseif args.getter_class and args.getter_class["is_"..prop] then + return args.getter_class["is_"..prop](cobj) end -- Make sure something like c:a_mutator() works