]> granicus.if.org Git - vim/commitdiff
patch 8.2.2119: GTK3: status line background color is wrong v8.2.2119
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 14:53:27 +0000 (15:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Dec 2020 14:53:27 +0000 (15:53 +0100)
Problem:    GTK3: status line background color is wrong.
Solution:   Don't change the code for earlier GTK3 versions. (closes #7444)

src/gui_gtk_x11.c
src/version.c

index 22788e84bd56ef742ef1de3a9604635437df639f..ec81d4efde3dfb0eb312f2f584e12687eff15796 100644 (file)
@@ -4031,15 +4031,18 @@ set_cairo_source_rgba_from_color(cairo_t *cr, guicolor_T color)
     void
 gui_mch_new_colors(void)
 {
-    if (gui.formwin != NULL && gtk_widget_get_window(gui.formwin) != NULL)
+    if (gui.drawarea != NULL
+#if GTK_CHECK_VERSION(3,22,2)
+           && gui.formwin != NULL
+#endif
+           && gtk_widget_get_window(gui.drawarea) != NULL)
     {
 #if !GTK_CHECK_VERSION(3,22,2)
-       GdkWindow * const da_win = gtk_widget_get_window(gui.formwin);
+       GdkWindow * const da_win = gtk_widget_get_window(gui.drawarea);
 #endif
-
 #if GTK_CHECK_VERSION(3,22,2)
-       GtkStyleContext * const context
-           = gtk_widget_get_style_context(gui.formwin);
+       GtkStyleContext * const context =
+                                    gtk_widget_get_style_context(gui.formwin);
        GtkCssProvider * const provider = gtk_css_provider_new();
        gchar * const css = g_strdup_printf(
                "widget#vim-gtk-form {\n"
index 7554fb3b7ceeb322a4f9dfa2c28af61e3314f524..8e2cf783720589c7de27f4b93e3265afdc9e7978 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2119,
 /**/
     2118,
 /**/