gdkpixmap.c patch for gtk+971025

David Mosberger-Tang (David.Mosberger@acm.org)
Sat, 25 Oct 1997 13:35:01 -0700

Unfortunately, the gdkpixmap patch is still missing from gtk+971025
which results in blank buttons on the gtkgamma widget (which is used
for gamma correction, for example). The patch below fixes the problem
for me (and yes, I sent mail to the gtk maintainers...).

--david

--- gdkpixmap.c~ Fri Oct 24 19:30:36 1997
+++ gdkpixmap.c Sat Oct 25 13:29:34 1997
@@ -424,9 +424,12 @@

*mask = gdk_pixmap_new (window, width, height, 1);
gc = gdk_gc_new (*mask);
+
+ tmp_color.pixel = 0;
+ gdk_gc_set_foreground (gc, &tmp_color);
gdk_draw_rectangle (*mask, gc, TRUE, 0, 0, -1, -1);

- gdk_color_white (colormap, &tmp_color);
+ tmp_color.pixel = ~((gulong) 0);
gdk_gc_set_foreground (gc, &tmp_color);
}

@@ -560,9 +563,12 @@

*mask = gdk_pixmap_new (window, width, height, 1);
gc = gdk_gc_new (*mask);
+
+ tmp_color.pixel = 0;
+ gdk_gc_set_foreground (gc, &tmp_color);
gdk_draw_rectangle (*mask, gc, TRUE, 0, 0, -1, -1);

- gdk_color_white (colormap, &tmp_color);
+ tmp_color.pixel = ~((gulong) 0);
gdk_gc_set_foreground (gc, &tmp_color);
}

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com