use "hidden" property in the turn on/off helpers
This commit is contained in:
parent
338dba6292
commit
48c59fadfd
|
@ -7,17 +7,8 @@ local _client = {}
|
|||
-- Remove current tag from window's tags
|
||||
--
|
||||
-- @param c A client
|
||||
function _client.turn_off(c, current_tag)
|
||||
if current_tag == nil then
|
||||
current_tag = c.screen.selected_tag
|
||||
end
|
||||
local ctags = {}
|
||||
for k, tag in pairs(c:tags()) do
|
||||
if tag ~= current_tag then
|
||||
table.insert(ctags, tag)
|
||||
end
|
||||
end
|
||||
c:tags(ctags)
|
||||
function _client.turn_off(c)
|
||||
c.hidden = true
|
||||
c.sticky = false
|
||||
end
|
||||
|
||||
|
@ -25,14 +16,7 @@ end
|
|||
--
|
||||
-- @param c A client
|
||||
function _client.turn_on(c)
|
||||
local current_tag = c.screen.selected_tag
|
||||
ctags = { current_tag }
|
||||
for k, tag in pairs(c:tags()) do
|
||||
if tag ~= current_tag then
|
||||
table.insert(ctags, tag)
|
||||
end
|
||||
end
|
||||
c:tags(ctags)
|
||||
c.hidden = false
|
||||
c:raise()
|
||||
client.focus = c
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue