Skip to content

Commit

Permalink
resolve_icon: also try second level relative dir name for icon size a…
Browse files Browse the repository at this point in the history
…nd scale
  • Loading branch information
xdavidwu authored and vilhalmer committed Apr 19, 2019
1 parent 762d6f7 commit e748e91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ static char *resolve_icon(struct mako_notification *notif) {
errno = 0;
int32_t icon_size = strtol(relative_path, NULL, 10);
if (errno || icon_size == 0) {
continue;
// Try second level subdirectory if failed.
errno = 0;
while (relative_path[0] != '/') {
++relative_path;
}
++relative_path;
icon_size = strtol(relative_path, NULL, 10);
if (errno || icon_size == 0) {
continue;
}
}

int32_t icon_scale = 1;
Expand Down

0 comments on commit e748e91

Please sign in to comment.