From f19912900d877dd5b0f423b057f2e6271888a484 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 7 Mar 2014 10:54:52 +0100 Subject: [PATCH] awful.util.spawn*: Remove obsolete screen argument Ever since commit 6b2e4352b (from 2010!), awesome.spawn() doesn't have a screen argument anymore and the extra argument from util.spawn was just ignored. Fix the code and the luadoc for these functions. Thanks to blueyed for noticing this. Signed-off-by: Uli Schlachter --- lib/awful/util.lua.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index ff94e0e88..0a90b76a7 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -72,22 +72,20 @@ end --- Spawn a program. -- @param cmd The command. -- @param sn Enable startup-notification. --- @param screen The screen where to spawn window. -- @return The awesome.spawn return value. -function util.spawn(cmd, sn, screen) +function util.spawn(cmd, sn) if cmd and cmd ~= "" then if sn == nil then sn = true end - return capi.awesome.spawn(cmd, sn, screen or capi.mouse.screen) + return capi.awesome.spawn(cmd, sn) end end --- Spawn a program using the shell. -- @param cmd The command. --- @param screen The screen where to run the command. -function util.spawn_with_shell(cmd, screen) +function util.spawn_with_shell(cmd) if cmd and cmd ~= "" then cmd = { util.shell, "-c", cmd } - return capi.awesome.spawn(cmd, false, screen or capi.mouse.screen) + return capi.awesome.spawn(cmd, false) end end