1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-09 21:52:10 -05:00

GTK: use C99 designated initialisers to set up XGCValues

I just think it looks nicer than a pile of assignments.
This commit is contained in:
Ben Harris 2025-04-27 14:55:12 +01:00
parent 82da46d22e
commit d1a56d67cc

View File

@ -641,12 +641,13 @@ static void x11font_cairo_init_gc(x11font_individual *xfi, Display *disp,
Pixmap pixmap)
{
if (xfi->gc == None) {
XGCValues gcvals;
XGCValues gcvals = {
.function = GXclear,
.foreground = 1,
.background = 0,
.font = xfi->xfs->fid,
};
gcvals.function = GXclear;
gcvals.foreground = 1;
gcvals.background = 0;
gcvals.font = xfi->xfs->fid;
xfi->gc = XCreateGC(disp, pixmap,
GCFunction | GCForeground | GCBackground | GCFont,
&gcvals);