Do layout.arrange only once per main loop
This uses timer.delayed_call to arrange the layouts only once per main loop.
This commit is contained in:
parent
ffa0001d34
commit
74106462ac
|
@ -16,6 +16,7 @@ local capi = {
|
|||
client = client
|
||||
}
|
||||
local client = require("awful.client")
|
||||
local timer = require("gears.timer")
|
||||
|
||||
--- Layout module for awful
|
||||
-- awful.layout
|
||||
|
@ -96,6 +97,8 @@ end
|
|||
function layout.arrange(screen)
|
||||
if arrange_lock then return end
|
||||
arrange_lock = true
|
||||
|
||||
timer.delayed_call(function()
|
||||
local p = {}
|
||||
p.workarea = capi.screen[screen].workarea
|
||||
-- Handle padding
|
||||
|
@ -111,7 +114,9 @@ function layout.arrange(screen)
|
|||
p.screen = screen
|
||||
layout.get(screen).arrange(p)
|
||||
capi.screen[screen]:emit_signal("arrange")
|
||||
|
||||
arrange_lock = false
|
||||
end)
|
||||
end
|
||||
|
||||
--- Get the current layout name.
|
||||
|
|
Loading…
Reference in New Issue