chore(applet): gracefully exit with log when panel exits

This was causing confusion for users that thought this symptom may be the cause of a problem.
This commit is contained in:
Michael Aaron Murphy 2026-05-22 01:21:03 +02:00
parent 2f022280f2
commit 113e0ae1f9
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -164,7 +164,18 @@ pub(crate) fn wayland_handler(
if app_data.exit {
break;
}
event_loop.dispatch(None, &mut app_data).unwrap();
if let Err(why) = event_loop.dispatch(None, &mut app_data) {
if let calloop::Error::IoError(ref why) = why
&& why.kind() == std::io::ErrorKind::BrokenPipe
{
tracing::info!("Connection to panel has ended. The applet will now exit with it.");
break;
}
tracing::error!(?why, "dispatch error on Wayland connection to panel");
break;
}
}
}