Merge pull request #8 from toumorokoshi/feature/fix-tag-orphan
fix tags being orphaned by screen disconnect
This commit is contained in:
commit
2a4396ea77
7
init.lua
7
init.lua
|
@ -44,6 +44,13 @@ local sharedtags = {
|
|||
local function salvage(tag)
|
||||
-- The screen to move the orphaned tag to.
|
||||
local newscreen = capi.screen.primary
|
||||
-- the primary screen may be the one that is being
|
||||
-- removed, so try to find a different screen if possible.
|
||||
for s in capi.screen do
|
||||
if s ~= tag.screen then
|
||||
newscreen = s
|
||||
end
|
||||
end
|
||||
|
||||
-- Make sure the tag isn't selected when moved to the new screen.
|
||||
tag.selected = false
|
||||
|
|
Loading…
Reference in New Issue