drawin: Add a property miss handler
This commit is contained in:
parent
66ca66ca87
commit
5404b3c374
|
@ -20,7 +20,7 @@ local base = require("wibox.widget.base")
|
|||
--- This provides widget box windows. Every wibox can also be used as if it were
|
||||
-- a drawin. All drawin functions and properties are also available on wiboxes!
|
||||
-- wibox
|
||||
local wibox = { mt = {} }
|
||||
local wibox = { mt = {}, object = {} }
|
||||
wibox.layout = require("wibox.layout")
|
||||
wibox.widget = require("wibox.widget")
|
||||
wibox.drawable = require("wibox.drawable")
|
||||
|
@ -298,6 +298,7 @@ end
|
|||
local function new(args)
|
||||
local ret = object()
|
||||
local w = capi.drawin(args)
|
||||
|
||||
ret.drawin = w
|
||||
ret._drawable = wibox.drawable(w.drawable, { wibox = ret },
|
||||
"wibox drawable (" .. object.modulename(3) .. ")")
|
||||
|
@ -348,6 +349,13 @@ function wibox.mt:__call(...)
|
|||
return new(...)
|
||||
end
|
||||
|
||||
-- Extend the luaobject
|
||||
object.properties(capi.drawin, {
|
||||
getter_class = wibox.object,
|
||||
setter_class = wibox.object,
|
||||
auto_emit = true,
|
||||
})
|
||||
|
||||
return setmetatable(wibox, wibox.mt)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue