awful.tag: Use delayed_call to call withcurrent on manage
This way this function runs after everything else did its job. The client will only get assigned a tag after everything else had a chance to do so. Thanks to this, awful.rules no longer has to disconnect the call to withcurrent. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7bc4ab0bf7
commit
90fde1393f
|
@ -224,11 +224,6 @@ function rules.execute(c, props, callbacks)
|
|||
end
|
||||
end
|
||||
|
||||
-- If untagged, stick the client on the current one.
|
||||
if #c:tags() == 0 then
|
||||
atag.withcurrent(c)
|
||||
end
|
||||
|
||||
-- Apply all callbacks.
|
||||
if callbacks then
|
||||
for i, callback in pairs(callbacks) do
|
||||
|
@ -244,7 +239,6 @@ function rules.execute(c, props, callbacks)
|
|||
end
|
||||
|
||||
client.connect_signal("manage", rules.apply)
|
||||
client.disconnect_signal("manage", atag.withcurrent)
|
||||
|
||||
return rules
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
-- Grab environment we need
|
||||
local util = require("awful.util")
|
||||
local timer = require("gears.timer")
|
||||
local tostring = tostring
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
|
@ -629,7 +630,9 @@ capi.client.connect_signal("manage", function(c)
|
|||
c:connect_signal("property::screen", tag.withcurrent)
|
||||
end)
|
||||
|
||||
capi.client.connect_signal("manage", tag.withcurrent)
|
||||
capi.client.connect_signal("manage", function(c)
|
||||
timer.delayed_call(tag.withcurrent, c)
|
||||
end)
|
||||
capi.tag.connect_signal("request::select", tag.viewonly)
|
||||
|
||||
capi.tag.add_signal("property::hide")
|
||||
|
|
Loading…
Reference in New Issue