awful.tag.withcurrent: Also act on restarts (FS#1155)
When awesome restarts because a new screen was added or removed, clients can end up being on a different screen than before the restart. However, the tags will be carried across the restart. This means that a client could end up being tagged with a tag from another screen. This results in weird behavior of tag switches and confuses users. To work around this, remove the client from any tags that are on a different screen during startup. If the client ends up without any tags, it will then be tagged with the currently selected tags. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
efd243b6d7
commit
4abf42b92f
|
@ -518,9 +518,7 @@ end
|
|||
|
||||
--- Tag a client with the set of current tags.
|
||||
-- @param c The client to tag.
|
||||
-- @param startup Optional: don't do anything if true.
|
||||
function tag.withcurrent(c, startup)
|
||||
if startup ~= true then
|
||||
function tag.withcurrent(c)
|
||||
local tags = {}
|
||||
for k, t in ipairs(c:tags()) do
|
||||
if tag.getscreen(t) == c.screen then
|
||||
|
@ -531,7 +529,6 @@ function tag.withcurrent(c, startup)
|
|||
tags = tag.selectedlist(c.screen)
|
||||
end
|
||||
c:tags(tags)
|
||||
end
|
||||
end
|
||||
|
||||
local function attached_connect_signal_screen(screen, sig, func)
|
||||
|
|
Loading…
Reference in New Issue