From 22d1375e5f4cdec3e25bc1a993c3b30ed2d23154 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 5 Oct 2016 20:41:18 +0200 Subject: [PATCH] awful.client: Remove persistent_properties_loaded Instead of having an extra weak table to save a boolean per client, this now sets a property directly on the client. Signed-off-by: Uli Schlachter --- lib/awful/client.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 334df516..81c762cb 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -48,7 +48,6 @@ client.data = {} client.data.marked = {} client.data.properties = setmetatable({}, { __mode = 'k' }) client.data.persistent_properties_registered = {} -- keys are names of persistent properties, value always true -client.data.persistent_properties_loaded = setmetatable({}, { __mode = 'k' }) -- keys are clients, value always true -- Functions client.urgent = require("awful.client.urgent") @@ -986,8 +985,8 @@ end -- @return The property. -- @deprecated awful.client.property.get function client.property.get(c, prop) - if not client.data.persistent_properties_loaded[c] then - client.data.persistent_properties_loaded[c] = true + if not c.data._persistent_properties_loaded then + c.data._persistent_properties_loaded = true for p in pairs(client.data.persistent_properties_registered) do local value = c:get_xproperty("awful.client.property." .. p) if value ~= nil then