Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Apply ATTR_REVERSE after ATTR_FAINT
[st.git]
/
x.c
diff --git
a/x.c
b/x.c
index
ab9593e
..
474d73b
100644
(file)
--- a/
x.c
+++ b/
x.c
@@
-507,7
+507,6
@@
xsetsel(char *str, Time t)
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
selclear_(NULL);
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
selclear_(NULL);
- xclipcopy();
}
void
}
void
@@
-1093,6
+1092,9
@@
xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
frc[frclen].font = XftFontOpenPattern(xw.dpy,
fontpattern);
frc[frclen].font = XftFontOpenPattern(xw.dpy,
fontpattern);
+ if (!frc[frclen].font)
+ die("XftFontOpenPattern failed seeking fallback font: %s\n",
+ strerror(errno));
frc[frclen].flags = frcflags;
frc[frclen].unicodep = rune;
frc[frclen].flags = frcflags;
frc[frclen].unicodep = rune;
@@
-1187,12
+1189,6
@@
xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
}
}
}
}
- if (base.mode & ATTR_REVERSE) {
- temp = fg;
- fg = bg;
- bg = temp;
- }
-
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
colfg.red = fg->color.red / 2;
colfg.green = fg->color.green / 2;
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
colfg.red = fg->color.red / 2;
colfg.green = fg->color.green / 2;
@@
-1201,6
+1197,13
@@
xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
fg = &revfg;
}
fg = &revfg;
}
+
+ if (base.mode & ATTR_REVERSE) {
+ temp = fg;
+ fg = bg;
+ bg = temp;
+ }
+
if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK)
fg = bg;
if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK)
fg = bg;