diff --git a/lib/wibox/layout/rotate.lua.in b/lib/wibox/layout/rotate.lua.in index c5119e1ef..5654263be 100644 --- a/lib/wibox/layout/rotate.lua.in +++ b/lib/wibox/layout/rotate.lua.in @@ -99,7 +99,7 @@ end --- Returns a new rotate layout. A rotate layout rotates a given widget. Use -- :set_widget() to set the widget and :set_direction() for the direction. -- The default direction is "north" which doesn't change anything. -local function new() +local function new(widget, dir) local ret = widget_base.make_widget() for k, v in pairs(rotate) do @@ -112,6 +112,9 @@ local function new() ret:emit_signal("widget::updated") end + ret:set_widget(widget) + ret:set_direction(dir or "north") + return ret end