awful.tag.withcurrent: Try harder at finding a tag (FS#1196)
When a screen doesn't have any tags selected, then just tag the new client with all of the screen's tags. That way, we don't lose clients. Also, if we failed at coming up with tags for a client, don't completely untag it. This means that it can keep its old tags if it had any. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
0b5fa183d1
commit
7852bfb22d
|
@ -530,7 +530,12 @@ function tag.withcurrent(c)
|
|||
if #tags == 0 then
|
||||
tags = tag.selectedlist(c.screen)
|
||||
end
|
||||
c:tags(tags)
|
||||
if #tags == 0 then
|
||||
tags = tag.gettags(c.screen)
|
||||
end
|
||||
if #tags ~= 0 then
|
||||
c:tags(tags)
|
||||
end
|
||||
end
|
||||
|
||||
local function attached_connect_signal_screen(screen, sig, func)
|
||||
|
|
Loading…
Reference in New Issue