fixup! fix(awful: placement: no_offsceen): use new placement infrastructure

doc(awful: placement: no_offscreen): update comment and print deprecation warning
This commit is contained in:
actionless 2018-07-25 14:31:51 +02:00
parent fec8d6aa8f
commit 492d07a9cd
1 changed files with 7 additions and 1 deletions

View File

@ -838,8 +838,14 @@ end
-- @tparam[opt=client's screen] integer args.screen The screen.
-- @treturn table The new client geometry.
function placement.no_offscreen(c, args)
--HACK necessary for composition to work. The API will be changed soon
--compatibility with the old API
if type(args) == "number" or type(args) == "screen" then
gdebug.deprecate(
"awful.placement.no_offscreen screen argument is deprecated"..
" use awful.placement.no_offscreen(c, {screen=...})",
{deprecated_in=5}
)
args = { screen = args }
end