[libnotify] notification: Avoid creating a new hint variant when nothing has changed
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnotify] notification: Avoid creating a new hint variant when nothing has changed
- Date: Mon, 25 Apr 2022 17:13:53 +0000 (UTC)
commit b2d6712b15f46f536054b31d1c8ccce739004faa
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Fri Apr 22 00:49:38 2022 +0200
notification: Avoid creating a new hint variant when nothing has changed
libnotify/notification.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libnotify/notification.c b/libnotify/notification.c
index a451d84..c2d2c72 100644
--- a/libnotify/notification.c
+++ b/libnotify/notification.c
@@ -1021,7 +1021,7 @@ get_parsed_variant (NotifyNotification *notification,
const char *str = g_variant_get_string (variant, NULL);
gchar *parsed = str_parser (notification, str);
- if (parsed != NULL) {
+ if (parsed != NULL && g_strcmp0 (str, parsed) != 0) {
g_variant_unref (variant);
variant = g_variant_new_take_string (parsed);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]