wibox.widget.background: Use draw_widget()
Without draw_widget(), the input handling is broken. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
661a8a7b38
commit
01aa7e66e6
|
@ -7,7 +7,7 @@
|
||||||
local oocairo = require("oocairo")
|
local oocairo = require("oocairo")
|
||||||
local base = require("wibox.widget.base")
|
local base = require("wibox.widget.base")
|
||||||
local color = require("gears.color")
|
local color = require("gears.color")
|
||||||
local widget_base = require("wibox.widget.base")
|
local layout_base = require("wibox.layout.base")
|
||||||
local setmetatable = setmetatable
|
local setmetatable = setmetatable
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local type = type
|
local type = type
|
||||||
|
@ -34,7 +34,7 @@ function draw(box, wibox, cr, width, height)
|
||||||
|
|
||||||
cr:restore()
|
cr:restore()
|
||||||
|
|
||||||
box.widget:draw(wibox, cr, width, height)
|
layout_base.draw_widget(wibox, cr, box.widget, 0, 0, width, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Fit this widget into the given area
|
--- Fit this widget into the given area
|
||||||
|
@ -52,7 +52,7 @@ function set_widget(box, widget)
|
||||||
box.widget:disconnect_signal("widget::updated", box._emit_updated)
|
box.widget:disconnect_signal("widget::updated", box._emit_updated)
|
||||||
end
|
end
|
||||||
if widget then
|
if widget then
|
||||||
widget_base.check_widget(widget)
|
base.check_widget(widget)
|
||||||
widget:connect_signal("widget::updated", box._emit_updated)
|
widget:connect_signal("widget::updated", box._emit_updated)
|
||||||
end
|
end
|
||||||
box.widget = widget
|
box.widget = widget
|
||||||
|
|
Loading…
Reference in New Issue