From 135ff4b0c8eb812f98efa9f3f80a9f00ef9a3b6a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 20 Apr 2016 22:34:16 +0200 Subject: [PATCH] Use gears.protected_call with awful.rules callbacks (#843) Fixes https://github.com/awesomeWM/awesome/issues/840#issuecomment-211823483. --- lib/awful/rules.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/awful/rules.lua b/lib/awful/rules.lua index 1a9b872c..81acb92c 100644 --- a/lib/awful/rules.lua +++ b/lib/awful/rules.lua @@ -18,6 +18,7 @@ local pairs = pairs local atag = require("awful.tag") local util = require("awful.util") local a_place = require("awful.placement") +local protected_call = require("gears.protected_call") local rules = {} @@ -466,7 +467,7 @@ function rules.execute(c, props, callbacks) -- Apply all callbacks. if callbacks then for _, callback in pairs(callbacks) do - callback(c) + protected_call(callback, c) end end