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.
This commit is contained in:
Emmanuel Lepage Vallee 2019-08-03 01:43:48 -04:00
parent efbc707279
commit c10312b511
1 changed files with 7 additions and 3 deletions

View File

@ -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