summaryrefslogtreecommitdiff
path: root/core/lua/astal/widget.lua
diff options
context:
space:
mode:
authorKevin <[email protected]>2024-10-09 21:34:49 -0300
committerGitHub <[email protected]>2024-10-09 21:34:49 -0300
commit68b2cdaa8081ad053fd8072ca9eef94cea426b2e (patch)
treee377e1621488ed777f113dd70af257c304f87a75 /core/lua/astal/widget.lua
parent6589834329b2b1cf8149522b70ac603e3667a0c8 (diff)
parent075c7e34aa0fbdc07c86965ab5a2ae79b92d3fd3 (diff)
Merge branch 'Aylur:main' into main
Diffstat (limited to 'core/lua/astal/widget.lua')
-rw-r--r--core/lua/astal/widget.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/lua/astal/widget.lua b/core/lua/astal/widget.lua
index 73fe3b6..8f49409 100644
--- a/core/lua/astal/widget.lua
+++ b/core/lua/astal/widget.lua
@@ -206,10 +206,6 @@ local function astalify(ctor)
-- construct, attach bindings, add children
local widget = ctor()
- for prop, value in pairs(props) do
- widget[prop] = value
- end
-
if getmetatable(children) == Binding then
set_children(widget, children:get())
widget.on_destroy = children:subscribe(function(v)
@@ -227,6 +223,10 @@ local function astalify(ctor)
end)
end
+ for prop, value in pairs(props) do
+ widget[prop] = value
+ end
+
if type(setup) == "function" then
setup(widget)
end