diff --git a/brightray/browser/linux/libnotify_loader.cc b/brightray/browser/linux/libnotify_loader.cc index f5c384db56..9720e64d8c 100644 --- a/brightray/browser/linux/libnotify_loader.cc +++ b/brightray/browser/linux/libnotify_loader.cc @@ -92,6 +92,15 @@ bool LibNotifyLoader::Load(const std::string& library_name) { return false; } + notify_notification_set_hint_string = + reinterpret_castnotify_notification_set_hint_string)>( + dlsym(library_, "notify_notification_set_hint_string")); + notify_notification_set_hint_string = &::notify_notification_set_hint_string; + if (!notify_notification_set_hint_string) { + CleanUp(true); + return false; + } + notify_notification_show = reinterpret_castnotify_notification_show)>( dlsym(library_, "notify_notification_show")); @@ -128,6 +137,7 @@ void LibNotifyLoader::CleanUp(bool unload) { notify_notification_add_action = NULL; notify_notification_set_image_from_pixbuf = NULL; notify_notification_set_timeout = NULL; + notify_notification_set_hint_string = NULL; notify_notification_show = NULL; notify_notification_close = NULL; } diff --git a/brightray/browser/linux/libnotify_loader.h b/brightray/browser/linux/libnotify_loader.h index 818b0ddae0..825a349b39 100644 --- a/brightray/browser/linux/libnotify_loader.h +++ b/brightray/browser/linux/libnotify_loader.h @@ -26,6 +26,7 @@ class LibNotifyLoader { decltype(&::notify_notification_add_action) notify_notification_add_action; decltype(&::notify_notification_set_image_from_pixbuf) notify_notification_set_image_from_pixbuf; decltype(&::notify_notification_set_timeout) notify_notification_set_timeout; + decltype(&::notify_notification_set_hint_string) notify_notification_set_hint_string; decltype(&::notify_notification_show) notify_notification_show; decltype(&::notify_notification_close) notify_notification_close;