Fix an issue when creating tags outside of Tyrannical

This commit is contained in:
Emmanuel Lepage Vallee 2013-05-16 15:19:52 -04:00
parent 2052e7dc7b
commit 1fae8f85bc
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ local class_client,matches_client = {},{}
--Called when a tag is selected/unselected --Called when a tag is selected/unselected
local function on_selected_change(tag,data) local function on_selected_change(tag,data)
if data.exec_once and tag.selected and not data._init_done then if data and data.exec_once and tag.selected and not data._init_done then
for k,v in ipairs(type(data.exec_once) == "string" and {data.exec_once} or data.exec_once) do for k,v in ipairs(type(data.exec_once) == "string" and {data.exec_once} or data.exec_once) do
awful.util.spawn(v, false) awful.util.spawn(v, false)
end end
@ -197,7 +197,7 @@ awful.tag.add,awful.tag._setscreen = function(tag,props)
local t3 = awful.tag._add(tag,{screen = awful.tag.getproperty(t,"clone_on"), clone_of = t,icon=awful.tag.geticon(t)}) local t3 = awful.tag._add(tag,{screen = awful.tag.getproperty(t,"clone_on"), clone_of = t,icon=awful.tag.geticon(t)})
--TODO prevent clients from being added to the clone --TODO prevent clients from being added to the clone
end end
t:connect_signal("property::selected", function(t) on_selected_change(t,props) end) t:connect_signal("property::selected", function(t) on_selected_change(t,props or {}) end)
return t return t
end,awful.tag.setscreen end,awful.tag.setscreen