mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-09 21:52:10 -05:00
GTK: correct a misuse of WhitePixel and BlackPixel
According to the X specs, WhitePixel and BlackPixel refer to permanent entries in the default colourmap. This means that they're not necessarily appropriate for use with a Drawable with a different depth than the root window. When drawing to a Pixmap that will be used as a 1-bit alpha mask by Cairo, the correct values are simply 0 (transparent) and 1 (opaque).
This commit is contained in:
parent
c71cc50e52
commit
578ed46f34
@ -677,8 +677,8 @@ static void x11font_cairo_setup(
|
|||||||
xfi->pixmap_surface = cairo_xlib_surface_create_for_bitmap(
|
xfi->pixmap_surface = cairo_xlib_surface_create_for_bitmap(
|
||||||
disp, xfi->pixmap, ScreenOfDisplay(disp, widgetscr),
|
disp, xfi->pixmap, ScreenOfDisplay(disp, widgetscr),
|
||||||
xfi->pixwidth, xfi->pixheight);
|
xfi->pixwidth, xfi->pixheight);
|
||||||
gcvals.foreground = WhitePixel(disp, widgetscr);
|
gcvals.foreground = 1;
|
||||||
gcvals.background = BlackPixel(disp, widgetscr);
|
gcvals.background = 0;
|
||||||
gcvals.font = xfi->xfs->fid;
|
gcvals.font = xfi->xfs->fid;
|
||||||
xfi->gc = XCreateGC(disp, xfi->pixmap,
|
xfi->gc = XCreateGC(disp, xfi->pixmap,
|
||||||
GCForeground | GCBackground | GCFont, &gcvals);
|
GCForeground | GCBackground | GCFont, &gcvals);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user