awesome
awesome copied to clipboard
Visual artifact in wibar tasklist with custom template
Output of awesome --version
:
awesome devel (Too long)
• Compiled against Lua 5.1.4 (running with LuaJIT 2.1.0-beta3)
• API level: 4
• D-Bus support: yes
• xcb-errors support: no
• execinfo support: yes
• xcb-randr version: 1.6
• LGI version: 0.9.2
• Transparency enabled: yes
• Custom search paths: no
How to reproduce the issue:
This is the relevant code:
local function update_tasklist(widget, c)
local b = widget:get_children_by_id('background')[1]
if not c.minimized then
b.fg = beautiful.fg_focus
b.bg = beautiful.bg_focus
else
b.fg = beautiful.fg_normal
b.bg = beautiful.bg_normal
end
end
screen.connect_signal('request::desktop_decoration', function(s)
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = ez.btntable(config.buttons.tasklist),
widget_template = {
{
{
{
{
id = 'icon',
widget = wibox.widget.textbox,
forced_width = beautiful.font_size + dpi(2),
},
right = dpi(6),
widget = wibox.container.margin,
},
{
id = 'text',
widget = wibox.widget.textbox,
align = 'center',
},
layout = wibox.layout.align.horizontal,
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin,
},
id = 'background',
widget = wibox.container.background,
create_callback = function(self, c)
local n, i = clients.get_name_and_icon(c)
i = util.icon_markup(i, 'xx-large', -(beautiful.font_size * 250))
self:get_children_by_id('text')[1].text = n
self:get_children_by_id('icon')[1].markup = i
update_tasklist(self, c)
end,
update_callback = update_tasklist,
},
}
end)
Note: this is a high DPI environment.
Actual result:
Occasionally, the background container affects only a portion of the text widget.
(The blue bar under the tasklist widget is a client titlebar.)
Expected result:
The background container should affect the entirety of the tasklist widget segment.