From ee382dc5a850cb0328c355ab4f44266b283e8ccc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 7 Feb 2009 15:19:37 +0100 Subject: [PATCH] awful.client: use property for floating registering Signed-off-by: Julien Danjou --- lib/awful/client.lua.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index 2527f82d..369dc117 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -31,7 +31,6 @@ data.focus = {} data.urgent = {} data.marked = {} data.properties = otable() -data.floating = otable() -- Functions urgent = {} @@ -532,8 +531,8 @@ end -- @param state True or false. function floating.set(c, s) local c = c or capi.client.focus - if c and data.floating[c] ~= s then - data.floating[c] = s + if c and property.get(c, "floating") ~= s then + property.set(c, "floating", s) capi.hooks.arrange()(c.screen) capi.hooks.property()(c, "floating") end @@ -564,8 +563,9 @@ end function floating.get(c) local c = c or capi.client.focus if c then - if data.floating[c] ~= nil then - return data.floating[c] + local value = property.get(c, "floating") + if value ~= nil then + return value end if c.type ~= "normal" or c.fullscreen @@ -582,7 +582,7 @@ end -- @param c A client. function floating.toggle(c) -- If it has been set to floating - if data.floating[c] then + if property.get(c, "floating") then floating.set(c, nil) else floating.set(c, true) -- 2.11.4.GIT