shims: Fix some bugs for ruled.tag.

This commit is contained in:
Emmanuel Lepage Vallee 2021-10-22 15:30:36 -07:00
parent ebc9b99ae2
commit 94e13b7bb0
1 changed files with 8 additions and 4 deletions

View File

@ -5,6 +5,8 @@ local clients = {}
local client, meta = awesome._shim_fake_class() local client, meta = awesome._shim_fake_class()
rawset(client, "_autotags", true)
-- Keep an history of the geometry for validation and images -- Keep an history of the geometry for validation and images
local function push_geometry(c) local function push_geometry(c)
table.insert(c._old_geo, c:geometry()) table.insert(c._old_geo, c:geometry())
@ -227,15 +229,18 @@ function client.gen_fake(args)
function ret:tags(new) --FIXME function ret:tags(new) --FIXME
if new then if new then
ret._tags = new ret._tags = new
ret:emit_signal("property::tags")
end end
if ret._tags then if ret._tags then
return ret._tags return ret._tags
end end
for _, t in ipairs(root._tags) do if client._autotags then
if t.screen == ret.screen then for _, t in ipairs(root._tags) do
return {t} if t.screen == ret.screen then
return {t}
end
end end
end end
@ -330,7 +335,6 @@ function client.gen_fake(args)
return meta.__index(self, key) return meta.__index(self, key)
end, end,
__newindex = function(self, key, value) __newindex = function(self, key, value)
if properties["set_"..key] then if properties["set_"..key] then
return properties["set_"..key](self, value) return properties["set_"..key](self, value)
end end