shims: Fix some bugs for ruled.tag.
This commit is contained in:
parent
ebc9b99ae2
commit
94e13b7bb0
|
@ -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,17 +229,20 @@ 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
|
||||||
|
|
||||||
|
if client._autotags then
|
||||||
for _, t in ipairs(root._tags) do
|
for _, t in ipairs(root._tags) do
|
||||||
if t.screen == ret.screen then
|
if t.screen == ret.screen then
|
||||||
return {t}
|
return {t}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue