# HG changeset patch # User Bram Moolenaar # Date 1599671703 -7200 # Node ID 9b5a90ad76c6381d547b5fb524bf687182c7ab64 # Parent cbbce430ab6c252877dae9a8022eab9b6cb40bc8 patch 8.2.1645: GTK3: icons become broken images when resized Commit: https://github.com/vim/vim/commit/81a4cf469a0f5c1603ac3130af9f011053854180 Author: Bram Moolenaar Date: Wed Sep 9 19:05:13 2020 +0200 patch 8.2.1645: GTK3: icons become broken images when resized Problem: GTK3: icons become broken images when resized. Solution: Use gtk_image_new_from_icon_name(). (closes https://github.com/vim/vim/issues/6916) Fix compiler warnings. diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -2555,7 +2555,8 @@ mainwin_realize(GtkWidget *widget UNUSED gtk_window_set_icon_list(GTK_WINDOW(gui.mainwin), icons); - g_list_foreach(icons, (GFunc)&g_object_unref, NULL); + // TODO: is this type cast OK? + g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL); g_list_free(icons); } @@ -3092,8 +3093,8 @@ icon_size_changed_foreach(GtkWidget *wid const gchar *icon_name; gtk_image_get_icon_name(image, &icon_name, NULL); - - gtk_image_set_from_icon_name(image, icon_name, icon_size); + image = (GtkImage *)gtk_image_new_from_icon_name( + icon_name, icon_size); } # else // User-defined icons are stored in a GtkIconSet @@ -4967,7 +4968,8 @@ ascii_glyph_table_init(void) } } - g_list_foreach(item_list, (GFunc)&pango_item_free, NULL); + // TODO: is this type cast OK? + g_list_foreach(item_list, (GFunc)(void *)&pango_item_free, NULL); g_list_free(item_list); pango_attr_list_unref(attr_list); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1645, +/**/ 1644, /**/ 1643,