Log Linux notification daemon startup errors

This commit is contained in:
Ilya Fedin
2025-11-20 05:45:08 +00:00
committed by John Preston
parent 667d92100e
commit 75a1657c49
@@ -263,19 +263,26 @@ void Create(Window::Notifications::System *system) {
kService,
kObjectPath,
[=](GObject::Object, Gio::AsyncResult res) {
auto proxy =
XdgNotifications::NotificationsProxy::new_for_bus_finish(
res,
nullptr);
auto result =
XdgNotifications::NotificationsProxy::new_for_bus_finish(res);
if (result) {
ServiceRegistered = bool(result->get_name_owner());
} else {
Gio::DBusErrorNS_::strip_remote_error(result.error());
LOG(("Native Notification Error: %1").arg(
result.error().message_().c_str()));
ServiceRegistered = false;
}
ServiceRegistered = proxy ? bool(proxy.get_name_owner()) : false;
if (!ServiceRegistered) {
CurrentServerInformation = {};
CurrentCapabilities = {};
managerSetter(proxy);
managerSetter({});
return;
}
auto proxy = *result;
auto interface = XdgNotifications::Notifications(proxy);
interface.call_get_server_information([=](