shims: Send the property:: signal for the client class.
This commit is contained in:
parent
56256d0c38
commit
fd8401a399
|
@ -288,10 +288,14 @@ function client.gen_fake(args)
|
|||
ret.drawable = ret
|
||||
|
||||
-- Make sure the layer properties are not `nil`
|
||||
ret.ontop = false
|
||||
ret.below = false
|
||||
ret.above = false
|
||||
ret.sticky = false
|
||||
local defaults = {
|
||||
ontop = false,
|
||||
below = false,
|
||||
above = false,
|
||||
sticky = false,
|
||||
urgent = false,
|
||||
focusable = true,
|
||||
}
|
||||
|
||||
-- Declare the deprecated buttons and keys methods.
|
||||
function ret:_keys(new)
|
||||
|
@ -319,6 +323,8 @@ function client.gen_fake(args)
|
|||
__index = function(self, key)
|
||||
if properties["get_"..key] then
|
||||
return properties["get_"..key](self)
|
||||
elseif defaults[key] ~= nil then
|
||||
return defaults[key]
|
||||
end
|
||||
|
||||
return meta.__index(self, key)
|
||||
|
@ -329,7 +335,14 @@ function client.gen_fake(args)
|
|||
return properties["set_"..key](self, value)
|
||||
end
|
||||
|
||||
return meta.__newindex(self, key, value)
|
||||
if defaults[key] ~= nil then
|
||||
defaults[key] = value
|
||||
else
|
||||
meta.__newindex(self, key, value)
|
||||
end
|
||||
|
||||
ret:emit_signal("property::"..key, value)
|
||||
--client.emit_signal("property::"..key, ret, value)
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue