Hello community, here is the log from the commit of package dunst for openSUSE:Factory checked in at 2019-07-03 15:15:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dunst (Old) and /work/SRC/openSUSE:Factory/.dunst.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dunst" Wed Jul 3 15:15:27 2019 rev:7 rq:713213 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dunst/dunst.changes 2019-06-01 09:47:22.695367743 +0200 +++ /work/SRC/openSUSE:Factory/.dunst.new.4615/dunst.changes 2019-07-03 15:15:28.499021335 +0200 @@ -1,0 +2,11 @@ +Wed Jul 3 10:50:50 UTC 2019 - Ondřej Súkup <[email protected]> + +- Update to version 1.4.1 + * max_icon_size not working with dynamic width + * Failure to parse color strings with trailing comments in the config + * Negative width in geometry being ignored + * Incorrect handling of the argument terminator -- in dunstify + * Crash when changing DPI while no notifications are displayed + * Fullscreen status change not being detected in some cases + +------------------------------------------------------------------- Old: ---- dunst-1.4.0.tar.gz New: ---- dunst-1.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dunst.spec ++++++ --- /var/tmp/diff_new_pack.5NGyue/_old 2019-07-03 15:15:29.327022902 +0200 +++ /var/tmp/diff_new_pack.5NGyue/_new 2019-07-03 15:15:29.331022910 +0200 @@ -18,7 +18,7 @@ %{!?_userunitdir:%define _userunitdir %{_prefix}/lib/systemd/user} Name: dunst -Version: 1.4.0 +Version: 1.4.1 Release: 0 Summary: A customizable notification daemon License: BSD-3-Clause ++++++ dunst-1.4.0.tar.gz -> dunst-1.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/CHANGELOG.md new/dunst-1.4.1/CHANGELOG.md --- old/dunst-1.4.0/CHANGELOG.md 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/CHANGELOG.md 2019-07-03 08:46:05.000000000 +0200 @@ -1,5 +1,16 @@ # Dunst changelog +## 1.4.1 - 2019-07-03 + +### Fixed + +- `max_icon_size` not working with dynamic width (#614) +- Failure to parse color strings with trailing comments in the config (#626) +- Negative width in geometry being ignored (#628) +- Incorrect handling of the argument terminator `--` in dunstify +- Crash when changing DPI while no notifications are displayed (#630) +- Fullscreen status change not being detected in some cases (#613) + ## 1.4.0 - 2019-03-30 ### Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/Makefile new/dunst-1.4.1/Makefile --- old/dunst-1.4.0/Makefile 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/Makefile 2019-07-03 08:46:05.000000000 +0200 @@ -3,7 +3,7 @@ include config.mk -VERSION := "1.4.0 (2019-03-30)" +VERSION := "1.4.1 (2019-07-03)" ifneq ($(wildcard ./.git/),) VERSION := $(shell ${GIT} describe --tags) endif @@ -132,6 +132,7 @@ clean-dunstify: rm -f dunstify.o + rm -f dunstify.d rm -f dunstify clean-doc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/dunstify.c new/dunst-1.4.1/dunstify.c --- old/dunst-1.4.0/dunstify.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/dunstify.c 2019-07-03 08:46:05.000000000 +0200 @@ -76,6 +76,33 @@ spec_version); } +/* + * Glib leaves the option terminator "--" in the argv after parsing in some + * cases. This function gets the specified argv element ignoring the first + * terminator. + * + * See https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#g-option-context-parse for details + */ +char *get_argv(char *argv[], int index) +{ + for (int i = 0; i <= index; i++) { + if (strcmp(argv[i], "--") == 0) { + return argv[index + 1]; + } + } + return argv[index]; +} + +/* Count the number of arguments in argv excluding the terminator "--" */ +int count_args(char *argv[], int argc) { + for (int i = 0; i < argc; i++) { + if (strcmp(argv[i], "--") == 0) + return argc - 1; + } + + return argc; +} + void parse_commandline(int argc, char *argv[]) { GError *error = NULL; @@ -100,17 +127,18 @@ die(0); } - if (argc < 2 && close_id < 1) { + int n_args = count_args(argv, argc); + if (n_args < 2 && close_id < 1) { g_printerr("I need at least a summary\n"); die(1); - } else if (argc < 2) { + } else if (n_args < 2) { summary = g_strdup("These are not the summaries you are looking for"); } else { - summary = g_strdup(argv[1]); + summary = g_strdup(get_argv(argv, 1)); } - if (argc > 2) { - body = g_strcompress(argv[2]); + if (n_args > 2) { + body = g_strcompress(get_argv(argv, 2)); } if (urgency_str) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/draw.c new/dunst-1.4.1/src/draw.c --- old/dunst-1.4.0/src/draw.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/draw.c 2019-07-03 08:46:05.000000000 +0200 @@ -611,6 +611,7 @@ void draw(void) { + assert(queues_length_displayed() > 0); GSList *layouts = create_layouts(x_win_get_context(win)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/menu.c new/dunst-1.4.1/src/menu.c --- old/dunst-1.4.0/src/menu.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/menu.c 2019-07-03 08:46:05.000000000 +0200 @@ -40,7 +40,7 @@ return true; char *regex = - "\\b(https?://|ftps?://|news://|mailto:|file://|www\\.)" + "\\<(https?://|ftps?://|news://|mailto:|file://|www\\.)" "[-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*" "(\\([-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*\\)|[-[:alnum:]_\\@;/?:&=%$+*~])+"; int code = regcomp(&url_regex, regex, REG_EXTENDED | REG_ICASE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/notification.h new/dunst-1.4.1/src/notification.h --- old/dunst-1.4.0/src/notification.h 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/notification.h 2019-07-03 08:46:05.000000000 +0200 @@ -8,7 +8,7 @@ #include "markup.h" -#define DUNST_NOTIF_MAX_CHARS 5000 +#define DUNST_NOTIF_MAX_CHARS 50000 enum behavior_fullscreen { FS_NULL, //!< Invalid value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/option_parser.c new/dunst-1.4.1/src/option_parser.c --- old/dunst-1.4.0/src/option_parser.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/option_parser.c 2019-07-03 08:46:05.000000000 +0200 @@ -355,17 +355,21 @@ char *value = g_strstrip(equal + 1); char *quote = strchr(value, '"'); + char *value_end = NULL; if (quote) { - char *closing_quote = strchr(quote + 1, '"'); - if (!closing_quote) { + value_end = strchr(quote + 1, '"'); + if (!value_end) { LOG_W("Invalid config file at line %d: Missing '\"'.", line_num); continue; } } else { - char *comment = strpbrk(value, "#;"); - if (comment) - *comment = '\0'; + value_end = value; } + + char *comment = strpbrk(value_end, "#;"); + if (comment) + *comment = '\0'; + value = g_strstrip(value); if (!current_section) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/settings.c new/dunst-1.4.1/src/settings.c --- old/dunst-1.4.0/src/settings.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/settings.c 2019-07-03 08:46:05.000000000 +0200 @@ -432,7 +432,7 @@ // restrict the icon size to a reasonable limit if we have a fixed width. // Otherwise the layout will be broken by too large icons. // See https://github.com/dunst-project/dunst/issues/540 - if (settings.geometry.width_set) { + if (settings.geometry.width_set && settings.geometry.w != 0) { const int icon_size_limit = settings.geometry.w / 2; if ( settings.max_icon_size == 0 || settings.max_icon_size > icon_size_limit) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/src/x11/x.c new/dunst-1.4.1/src/x11/x.c --- old/dunst-1.4.0/src/x11/x.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/src/x11/x.c 2019-07-03 08:46:05.000000000 +0200 @@ -341,11 +341,15 @@ LOG_D("XEvent: processing PropertyNotify for Resource manager"); XRM_update_db(); screen_dpi_xft_cache_purge(); - draw(); + + if (win->visible) { + draw(); + } break; } /* Explicitly fallthrough. Other PropertyNotify events, e.g. catching * _NET_WM get handled in the Focus(In|Out) section */ + case ConfigureNotify: case FocusIn: case FocusOut: LOG_D("XEvent: Checking for active screen changes"); @@ -531,16 +535,15 @@ struct geometry x_parse_geometry(const char *geom_str) { assert(geom_str); + struct geometry geometry = { 0 }; if (geom_str[0] == '-') { - settings.geometry.negative_width = true; + geometry.negative_width = true; geom_str++; } else { - settings.geometry.negative_width = false; + geometry.negative_width = false; } - struct geometry geometry = { 0 }; - int mask = XParseGeometry(geom_str, &geometry.x, &geometry.y, &geometry.w, &geometry.h); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/test/data/test-ini new/dunst-1.4.1/test/data/test-ini --- old/dunst-1.4.0/test/data/test-ini 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/test/data/test-ini 2019-07-03 08:46:05.000000000 +0200 @@ -23,6 +23,9 @@ quoted = "A quoted string" quoted_with_quotes = "A string "with quotes"" unquoted_with_quotes = A" string with quotes" + quoted_comment = "String with a" # comment + unquoted_comment = String with a # comment + color_comment = "#ffffff" # comment [path] expand_tilde = ~/.path/to/tilde diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunst-1.4.0/test/option_parser.c new/dunst-1.4.1/test/option_parser.c --- old/dunst-1.4.0/test/option_parser.c 2019-03-30 17:47:06.000000000 +0100 +++ new/dunst-1.4.1/test/option_parser.c 2019-07-03 08:46:05.000000000 +0200 @@ -54,6 +54,14 @@ ASSERT_STR_EQ("A\" string with quotes\"", (ptr = ini_get_string(string_section, "unquoted_with_quotes", ""))); free(ptr); + ASSERT_STR_EQ("String with a", (ptr = ini_get_string(string_section, "quoted_comment", ""))); + free(ptr); + ASSERT_STR_EQ("String with a", (ptr = ini_get_string(string_section, "unquoted_comment", ""))); + free(ptr); + ASSERT_STR_EQ("#ffffff", (ptr = ini_get_string(string_section, "color_comment", ""))); + free(ptr); + + ASSERT_STR_EQ("default value", (ptr = ini_get_string(string_section, "nonexistent", "default value"))); free(ptr);
