Skip to content

Commit

Permalink
shims: Implement the titlebar size API properly.
Browse files Browse the repository at this point in the history
Needed for the screenshot API.
  • Loading branch information
Elv13 committed Nov 14, 2022
1 parent d92a1c4 commit fc9b067
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/examples/shims/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc9b067

Please sign in to comment.