diff --git a/tests/examples/awful/template.lua b/tests/examples/awful/template.lua index 4db97c3ac..5e01691f0 100644 --- a/tests/examples/awful/template.lua +++ b/tests/examples/awful/template.lua @@ -98,10 +98,20 @@ local total_area = wibox.layout { } local function wrap_titlebar(tb, width, height) + + local bg, fg + + if args.honor_titlebar_colors then + bg = tb.drawable.background_color or tb.args.bg_normal + fg = tb.drawable.foreground_color or tb.args.fg_normal + else + bg, fg = tb.args.bg_normal, tb.args.fg_normal + end + return wibox.widget { tb.drawable.widget, - bg = tb.args.bg_normal, - fg = tb.args.fg_normal, + bg = bg, + fg = fg, forced_width = width, forced_height = height, widget = wibox.container.background @@ -160,10 +170,15 @@ local function client_widget(c, col, label) border_color = bc, shape_clip = true, border_strategy = "inner", + opacity = c.opacity, fg = beautiful.fg_normal or "#000000", bg = col, shape = function(cr2, w, h) - return shape.rounded_rect(cr2, w, h, args.radius or 5) + if c.shape then + c.shape(cr2, w, h) + else + return shape.rounded_rect(cr2, w, h, args.radius or 5) + end end, forced_width = geo.width + 2*bw, @@ -201,7 +216,14 @@ end -- Loop each clients geometry history and paint it for _, c in ipairs(client.get()) do - if not c.minimized then + + local is_displayed = false + + for _, t in pairs(c:tags()) do + is_displayed = is_displayed or t.selected + end + + if (not c.minimized) and is_displayed then local pgeo = nil for _, geo in ipairs(c._old_geo) do if not geo._hide then