tabulous: fixed deprecated focus_get/set calls

Hi again,

some trivial cleanup that (I think) needed to be done.

Cheers,

Mawww.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Maxime COSTE 2008-08-28 17:29:54 +08:00 committed by Julien Danjou
parent 442eb739c7
commit ef7d08c027
1 changed files with 11 additions and 11 deletions

View File

@ -50,7 +50,7 @@ function display(tabindex, cl)
cl.hide = false cl.hide = false
cl:swap(p) cl:swap(p)
p.hide = true p.hide = true
cl:focus_set() capi.client.focus = cl
tabbed[tabindex][1] = cl tabbed[tabindex][1] = cl
@ -64,7 +64,7 @@ end
-- @param cl The client -- @param cl The client
-- @return The key. -- @return The key.
function tabindex_check(tabindex, cl) function tabindex_check(tabindex, cl)
local c = cl or capi.client.focus_get() local c = cl or capi.client.focus
return findkey(tabbed[tabindex], c) return findkey(tabbed[tabindex], c)
end end
@ -72,7 +72,7 @@ end
-- @param cl The client to search. -- @param cl The client to search.
-- @return The tab index. -- @return The tab index.
function tabindex_get(cl) function tabindex_get(cl)
local c = cl or capi.client.focus_get() local c = cl or capi.client.focus
for tabindex, tabdisplay in pairs(tabbed) do for tabindex, tabdisplay in pairs(tabbed) do
-- Loop through all tab displays -- Loop through all tab displays
@ -155,7 +155,7 @@ end
-- @param cl The client to remove. -- @param cl The client to remove.
-- @return True if the client has been untabbed. -- @return True if the client has been untabbed.
function untab(cl) function untab(cl)
local c = cl or capi.client.focus_get() local c = cl or capi.client.focus
local tabindex = tabindex_get(c) local tabindex = tabindex_get(c)
if tabindex == nil then return false end if tabindex == nil then return false end
@ -194,7 +194,7 @@ end
-- @param cl The client to set into the tab, focused one otherwise. -- @param cl The client to set into the tab, focused one otherwise.
-- @return The created tab index. -- @return The created tab index.
function tab_create(cl) function tab_create(cl)
local c = cl or capi.client.focus_get() local c = cl or capi.client.focus
if not c then return end if not c then return end
@ -211,7 +211,7 @@ end
-- @param tabindex The tab index. -- @param tabindex The tab index.
-- @param cl The client to add, or the focused one otherwise. -- @param cl The client to add, or the focused one otherwise.
function tab(tabindex, cl) function tab(tabindex, cl)
local c = cl or capi.client.focus_get() local c = cl or capi.client.focus
if tabbed[tabindex] ~= nil then if tabbed[tabindex] ~= nil then
local x = tabindex_get(c) local x = tabindex_get(c)
@ -241,7 +241,7 @@ end
-- client is tabbed. -- client is tabbed.
function autotab_start() function autotab_start()
awful.hooks.manage.register(function (c) awful.hooks.manage.register(function (c)
local sel = capi.client.focus_get() local sel = capi.client.focus
local index = tabindex_get(sel) local index = tabindex_get(sel)
if index ~= nil then if index ~= nil then
@ -252,9 +252,9 @@ function autotab_start()
end) end)
end end
--- Update the tabbing when current tags changes, by unactivating --- update the tabbing when current tags changes, by unactivating
-- all tabs that are not in the current tag (and activating the good one). -- all tabs that are not in the current tag (and activating the good one)
local function update_tabbing() function update_tabbing()
-- do nothing if nothing changed -- do nothing if nothing changed
if active_tag == awful.tag.selected().name then return end if active_tag == awful.tag.selected().name then return end
@ -289,7 +289,7 @@ local function update_tabbing()
end end
end end
-- Update the tabbing when the tags changes -- update the tabbing when the tags changes
awful.hooks.arrange.register(update_tabbing) awful.hooks.arrange.register(update_tabbing)
-- Set up hook so we don't leave lost hidden clients -- Set up hook so we don't leave lost hidden clients