shims: Set the client metatable earlier.

Once the signals get propagated, it means "manage" will call code before
the metatable is set. If this happens and it sets some properties, they
will perpetually bypass the `awful.client.object` handler.
This commit is contained in:
Emmanuel Lepage Vallee 2019-03-14 20:56:20 -04:00
parent 936040a283
commit 8111495c88
1 changed files with 6 additions and 4 deletions

View File

@ -140,13 +140,15 @@ function client.gen_fake(args)
client.focus = ret
setmetatable(ret, {
__index = function(...) return meta.__index(...) end,
__newindex = function(...) return meta.__newindex(...) end
})
client.emit_signal("manage", ret)
assert(not args.screen or (args.screen == ret.screen))
return setmetatable(ret, {
__index = function(...) return meta.__index(...) end,
__newindex = function(...) return meta.__newindex(...) end
})
return ret
end
function client.get(s)