Bug#891645: gtk2-engines-pixbuf: does not show user defined background colors for entry widgets

Thomas Klose thomas.klose at hiperscan.com
Tue Feb 27 16:35:19 UTC 2018


Package: gtk2-engines-pixbuf
Version: 2.24.31-2
Severity: normal

Dear Maintainer,

   * Any GTK2 application with user-defined background color of an Entry
(widget) is displayed incorrectly
   * I wrote a small GTK+ program, which includes an GTK Entry with user-
defined (red) background color
   * With Debian 9/Stretch the background color of the Entry is shown white.
The problem occures only if the package gtk-engines-pixbuf is installed. The
problem does not show with Debian 8/Jessie or Ubuntu 16.04/Xenial. Since
uninstalling the package gtk-engines-pixbuf is not a real option, this is an
issue for several (GTK2-) applications.
   * Debian 9/Stretch should show the background of GTK2 Entries with the
expected/defined color

Please find attached a small demo program. You can compile it with the
following command

gcc `pkg-config --cflags --libs gtk+-2.0` no-background-color.c

Thanks for your help and the great work!

With best regards.
Thomas Klose



-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-6-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gtk2-engines-pixbuf depends on:
ii  libatk1.0-0          2.22.0-1
ii  libc6                2.24-11+deb9u1
ii  libcairo2            1.14.8-1
ii  libfontconfig1       2.11.0-6.7+b1
ii  libfreetype6         2.6.3-3.2
ii  libgdk-pixbuf2.0-0   2.36.5-2+deb9u2
ii  libglib2.0-0         2.50.3-2
ii  libgtk2.0-0          2.24.31-2
ii  libgtk2.0-common     2.24.31-2
ii  libpango-1.0-0       1.40.5-1
ii  libpangocairo-1.0-0  1.40.5-1
ii  libpangoft2-1.0-0    1.40.5-1
ii  libx11-6             2:1.6.4-3
ii  libxcomposite1       1:0.4.4-2
ii  libxdamage1          1:1.1.4-2+b3
ii  libxfixes3           1:5.0.3-1

gtk2-engines-pixbuf recommends no packages.

gtk2-engines-pixbuf suggests no packages.

-- no debconf information
-------------- next part --------------
#include <gtk/gtk.h>

static gboolean delete_event( GtkWidget *widget,
                              GdkEvent  *event,
                              gpointer   data )
{
    g_print ("delete event occurred\n");
    return TRUE;
}

static void destroy( GtkWidget *widget,
                     gpointer   data )
{
    gtk_main_quit ();
}

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
    GtkWidget *entry;
    
    gtk_init (&argc, &argv);
    
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    
    g_signal_connect (window, "delete-event",
		      G_CALLBACK (delete_event), NULL);
    
    g_signal_connect (window, "destroy",
		      G_CALLBACK (destroy), NULL);
    
    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
    
    entry = gtk_entry_new();

    GdkColor col;
    gdk_color_parse("red", &col);

    // this should change the entry's background color to red
    gtk_widget_modify_base(entry, GTK_STATE_NORMAL, &col);

    gtk_container_add (GTK_CONTAINER (window), entry);
    gtk_widget_show (entry);
    gtk_widget_show (window);
    
    gtk_main ();
    
    return 0;
}


More information about the pkg-gnome-maintainers mailing list