diff --git a/lib/awful/ewmh.lua b/lib/awful/ewmh.lua index 817a69bd..cde67f76 100644 --- a/lib/awful/ewmh.lua +++ b/lib/awful/ewmh.lua @@ -204,7 +204,8 @@ function ewmh.tag(c, t, hints) --luacheck: no unused if c.transient_for and not (hints and hints.reason == "screen") then c.screen = c.transient_for.screen if not c.sticky then - c:tags(c.transient_for:tags()) + local tags = c.transient_for:tags() + c:tags(#tags > 0 and tags or c.transient_for.screen.selected_tags) end else c:to_selected_tags()