Fix-incorrect-optimization-in-find_builtin_icon.patch 941 B

123456789101112131415161718192021222324252627282930
  1. From: John Lindgren <john@jlindgren.net>
  2. Date: Sat, 17 Feb 2018 22:03:27 -0500
  3. Subject: Fix incorrect optimization in find_builtin_icon().
  4. When we found an icon with exactly the requested size, we'd stop
  5. searching immediately (good), but we'd neglect to set the returned
  6. min_difference to 0 (bad). This caused theme_lookup_icon() to
  7. prefer other, potentially much worse, matches over the exact one.
  8. Cherry-picked from 5aa939dc (gtk-3-22)
  9. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=792738
  10. Origin: upstream, 2.24.33, commit:9ce6f8086e3b264f30add5bd5bfab005c359ac66
  11. ---
  12. gtk/gtkicontheme.c | 1 +
  13. 1 file changed, 1 insertion(+)
  14. diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
  15. index 532d94b..470158c 100644
  16. --- a/gtk/gtkicontheme.c
  17. +++ b/gtk/gtkicontheme.c
  18. @@ -3396,6 +3396,7 @@ find_builtin_icon (const gchar *icon_name,
  19. if (difference == 0)
  20. {
  21. + min_difference = 0;
  22. min_icon = default_icon;
  23. break;
  24. }