---
 layout.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/layout.c b/layout.c
index ba65e7b..04d201e 100644
--- a/layout.c
+++ b/layout.c
@@ -46,6 +46,12 @@ arrange(int screen)
             client_ban(c);
     }
 
+    /* Reset status before calling arrange hook.
+     * This is needed if you call a function that relies 
+     * on need_arrange while arrange is in progress.
+     */
+    globalconf.screens[screen].need_arrange = false;
+
     /* call hook */
     if(globalconf.hooks.arrange != LUA_REFNIL)
     {
@@ -70,9 +76,6 @@ arrange(int screen)
 
         p_delete(&qp_r);
     }
-
-    /* reset status */
-    globalconf.screens[screen].need_arrange = false;
 }
 
 /** Refresh the screen disposition
-- 
1.6.1.3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to