From 42287a5f040f4d5eaa33646ab4d10f6de920d2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 25 Jul 2019 02:59:54 +0200 Subject: [PATCH] restart: Request to hide the restart message if not accepted In case the shell ignores or can't accept the restart request we should hide the message that has been just requested to be shown. As per ::show-restart-message signal documentation, this has to be done by emitting the signal with a NULL message. So follow the API properly in such case Part-of: --- src/core/restart.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/restart.c b/src/core/restart.c index 10a6bd0c9..e9a5bfd27 100644 --- a/src/core/restart.c +++ b/src/core/restart.c @@ -59,7 +59,12 @@ static void restart_check_ready (void) { if (restart_helper_started && restart_message_shown) - meta_display_request_restart (meta_get_display ()); + { + MetaDisplay *display = meta_get_display (); + + if (!meta_display_request_restart (display)) + meta_display_show_restart_message (display, NULL); + } } static void