From 57ec268b8e0e3666a29a25305f68e6031a2d9e48 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 29 Mar 2015 20:20:53 +0200 Subject: [PATCH] tasklist: handle transient_for with skip_taskbar clients Ref: https://github.com/awesomeWM/awesome/issues/182 --- lib/awful/widget/tasklist.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index 8a8c7656..052959d1 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -79,7 +79,17 @@ local function tasklist_label(c, args) else name = name .. (util.escape(c.name) or util.escape("")) end - if capi.client.focus == c then + local focused = capi.client.focus == c + -- Handle transient_for: the first parent that does not skip the taskbar + -- is considered to be focused, if the real client has skip_taskbar. + if not focused and capi.client.focus and capi.client.focus.skip_taskbar + and client.get_transient_for_matching(capi.client.focus, + function(c) + return not c.skip_taskbar + end) == c then + focused = true + end + if focused then bg = bg_focus text = text .. ""..name.."" bg_image = bg_image_focus