From c10312b5114724f97dc23902b5c383857515723e Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 3 Aug 2019 01:43:48 -0400 Subject: [PATCH] naughty: Fix a race condition which cause startup errors to be missed. This commit will be "reverted" when the screen refactoring is merged since it has a better fix. --- lib/naughty/init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/naughty/init.lua b/lib/naughty/init.lua index f360d531..1df33c37 100644 --- a/lib/naughty/init.lua +++ b/lib/naughty/init.lua @@ -20,9 +20,13 @@ naughty.notification = require("naughty.notification") -- Handle runtime errors during startup if capi.awesome.startup_errors then - naughty.emit_signal( - "request::display_error", capi.awesome.startup_errors, true - ) + -- Wait until `rc.lua` is executed before creating the notifications. + -- Otherwise nothing is handling them (yet). + awesome.connect_signal("startup", function() + naughty.emit_signal( + "request::display_error", capi.awesome.startup_errors, true + ) + end) end -- Handle runtime errors after startup