From 28926489166839946982fd8e0351de14b3f98fc3 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 24 Dec 2018 23:04:44 -0500 Subject: [PATCH] awful.layout: Add a deprecated notice. It was already deprecated, but this wasn't documented and silently fixed. --- lib/awful/layout/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index d9f0ef45..6dcfaa41 100644 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -22,6 +22,7 @@ local ascreen = require("awful.screen") local timer = require("gears.timer") local gmath = require("gears.math") local gtable = require("gears.table") +local gdebug = require("gears.debug") local protected_call = require("gears.protected_call") local function get_screen(s) @@ -108,6 +109,9 @@ function layout.inc(i, s, layouts) if type(i) == "table" then -- Older versions of this function had arguments (layouts, i, s), but -- this was changed so that 'layouts' can be an optional parameter + gdebug.deprecate("Use awful.layout.inc(increment, screen, layouts) instead".. + " of awful.layout.inc(layouts, increment, screen)", {deprecated_in=5}) + layouts, i, s = i, s, layouts end s = get_screen(s or ascreen.focused())