From 1fae8f85bc38d819177328d9cd8cbf9c4069ed5e Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 16 May 2013 15:19:52 -0400 Subject: [PATCH] Fix an issue when creating tags outside of Tyrannical --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index f467e20..8343fd7 100644 --- a/init.lua +++ b/init.lua @@ -30,7 +30,7 @@ local class_client,matches_client = {},{} --Called when a tag is selected/unselected 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 awful.util.spawn(v, false) 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)}) --TODO prevent clients from being added to the clone 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 end,awful.tag.setscreen