awful.tag: make viewmore smarter
This avoids flickering. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
743603d24d
commit
d4e6411971
|
@ -263,9 +263,9 @@ end
|
||||||
-- @param tags A table with tags to view only.
|
-- @param tags A table with tags to view only.
|
||||||
-- @param screen Optional screen number of the tags.
|
-- @param screen Optional screen number of the tags.
|
||||||
function viewmore(tags, screen)
|
function viewmore(tags, screen)
|
||||||
viewnone(screen)
|
local screen_tags = capi.screen[screen or capi.mouse.screen]:tags()
|
||||||
for i, t in pairs(tags) do
|
for _, tag in pairs(screen_tags) do
|
||||||
t.selected = true
|
tag.selected = (table.hasitem(tags, tag) ~= nil)
|
||||||
end
|
end
|
||||||
capi.screen[screen]:emit_signal("tag::history::update")
|
capi.screen[screen]:emit_signal("tag::history::update")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue