Hopefully now really choosing the best icon for a given size

This commit is contained in:
Pierre Pronchery 2010-05-10 10:34:45 +00:00
parent 487f008a0c
commit d72bc2ba8e

View File

@ -511,7 +511,8 @@ static GdkPixbuf * _do_pixbuf(Tasks * tasks, Window window)
best = &buf[i];
break;
}
if(best == NULL || best[0] < width) /* XXX bigger != better */
if(best == NULL || abs(best[0] - tasks->icon_width)
> abs(width - tasks->icon_width))
best = &buf[i];
}
if(best != NULL)