gtk-970925 fix

David Mosberger-Tang (David.Mosberger@acm.org)
Wed, 15 Oct 1997 23:02:06 -0700

Unfortunately, it appears that gtk-970925 has problems with
transparent pixmaps again. This manifests itself in blank
push-buttons for the gamma controls (i.e., the ugly-looking icons that
took me hours to draw won't show up at all, which makes it kind of
hard to figure out what they're supposed to do... ;-)

Below is the patch that Pete sent me for gtk-970606---fortunately, it
still does the trick. After applying the patch, you'll have to
rebuild and reinstall libgdk.

Cheers,

--david

--- gdkpixmap.c~ Wed Sep 24 18:29:11 1997
+++ gdkpixmap.c Wed Oct 15 22:53:17 1997
@@ -408,9 +408,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);
}

@@ -543,9 +546,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