From e59f28a556b1b836d96892f47c7c3405ab54362b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 18 May 2009 16:18:14 +0200 Subject: [PATCH] awful.layout: call layout hook on layout set Signed-off-by: Julien Danjou --- lib/awful/layout/init.lua.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index a601a9e6c..c0e20787a 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -23,6 +23,9 @@ local hooks = require("awful.hooks") --- Layout module for awful module("awful.layout") +-- Create a hook to call when changing layout +hooks.user.create("layout") + --- Get the current layout. -- @param screen The screen number. -- @return The layout function. @@ -58,6 +61,7 @@ end function set(layout, t) t = t or tag.selected() tag.setproperty(t, "layout", layout) + hooks.user.call("layout", t, layout) capi.hooks.arrange()(t.screen) end