Use gears.protected_call with awful.rules callbacks (#843)

Fixes https://github.com/awesomeWM/awesome/issues/840#issuecomment-211823483.
This commit is contained in:
Daniel Hahler 2016-04-20 22:34:16 +02:00
parent cdc6909bc7
commit 135ff4b0c8
1 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ local pairs = pairs
local atag = require("awful.tag") local atag = require("awful.tag")
local util = require("awful.util") local util = require("awful.util")
local a_place = require("awful.placement") local a_place = require("awful.placement")
local protected_call = require("gears.protected_call")
local rules = {} local rules = {}
@ -466,7 +467,7 @@ function rules.execute(c, props, callbacks)
-- Apply all callbacks. -- Apply all callbacks.
if callbacks then if callbacks then
for _, callback in pairs(callbacks) do for _, callback in pairs(callbacks) do
callback(c) protected_call(callback, c)
end end
end end