From 492d07a9cd90abb2d3924356e757077a142275cb Mon Sep 17 00:00:00 2001 From: actionless Date: Wed, 25 Jul 2018 14:31:51 +0200 Subject: [PATCH] fixup! fix(awful: placement: no_offsceen): use new placement infrastructure doc(awful: placement: no_offscreen): update comment and print deprecation warning --- lib/awful/placement.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index e439336b..41334bc4 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -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