Skip to content

gtkiconhelper: also apply icon effects when the source is a cairo surface. Fixes #1542

Christoph Reiter requested to merge creiter/gtk:surface-icon-effects into gtk-3-24

gtk_css_icon_effect_apply() was only called on all icon types that were converted to cairo surfaces but not on cairo surfaces themselves.

This was for example visible when moving a GtkImage from GdkPixbuf to cairo_surface_t and gtk_widget_set_sensitive() on the image no longer having any effect.

To fix this copy the surface and apply the effect in case there is an effect active. Otherwise just use the surface as is.

Merge request reports