shims: Implement the titlebar size API properly.

Needed for the screenshot API.
This commit is contained in:
Emmanuel Lepage Vallee 2022-09-05 22:57:19 -07:00
parent d92a1c498b
commit fc9b06787b
1 changed files with 4 additions and 2 deletions

View File

@ -19,8 +19,10 @@ end
local function titlebar_meta(c)
for _, position in ipairs {"top", "bottom", "left", "right" } do
c["titlebar_"..position] = function(size) --luacheck: no unused
return drawin{}
c["titlebar_"..position] = function(_, size)
local prop = "titlebar_"..position.."_size"
c._private[prop] = c._private[prop] or size
return drawin{}, c._private[prop] or 0
end
end
end