From a757ddabc4484a9369c30fb28327145df4f37673 Mon Sep 17 00:00:00 2001 From: koniu Date: Fri, 8 Jan 2010 15:26:21 +0000 Subject: [PATCH] awful.rules: tag clients without flicker (FS#664) We unregister the default awful.tag.withcurrent 'manage' signal handler and have awful.rules.apply handle initial client tagging. Signed-off-by: koniu Signed-off-by: Julien Danjou --- lib/awful/rules.lua.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/awful/rules.lua.in b/lib/awful/rules.lua.in index 8859b2aa1..425bb69d0 100644 --- a/lib/awful/rules.lua.in +++ b/lib/awful/rules.lua.in @@ -109,7 +109,7 @@ function apply(c) if property == "floating" then aclient.floating.set(c, value) elseif property == "tag" then - aclient.movetotag(value, c) + c:tags({ value }) elseif property == "switchtotag" and value and props.tag then atag.viewonly(props.tag) elseif property == "height" or property == "width" or @@ -124,6 +124,11 @@ function apply(c) end end + -- If untagged, stick the client on the current one. + if #c:tags() == 0 then + atag.withcurrent(c, startup) + end + -- Apply all callbacks from matched rules. for i, callback in pairs(callbacks) do callback(c) @@ -137,5 +142,6 @@ function apply(c) end client.add_signal("manage", apply) +client.remove_signal("manage", atag.withcurrent) -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80