mirror of
https://github.com/pikami/st.git
synced 2024-12-02 00:35:43 +00:00
Merge branch 'master' of ssh://suckless.org/gitrepos/st
This commit is contained in:
commit
71328cbcdc
20
st.c
20
st.c
@ -2887,7 +2887,8 @@ xhints(void) {
|
|||||||
sizeh->min_height = sizeh->max_height = xw.fh;
|
sizeh->min_height = sizeh->max_height = xw.fh;
|
||||||
}
|
}
|
||||||
|
|
||||||
XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm, &class);
|
XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm,
|
||||||
|
&class);
|
||||||
XFree(sizeh);
|
XFree(sizeh);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3176,6 +3177,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
if(base.fg == defaultfg)
|
if(base.fg == defaultfg)
|
||||||
base.fg = defaultunderline;
|
base.fg = defaultunderline;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IS_TRUECOL(base.fg)) {
|
if(IS_TRUECOL(base.fg)) {
|
||||||
colfg.alpha = 0xffff;
|
colfg.alpha = 0xffff;
|
||||||
colfg.red = TRUERED(base.fg);
|
colfg.red = TRUERED(base.fg);
|
||||||
@ -3198,8 +3200,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
bg = &dc.col[base.bg];
|
bg = &dc.col[base.bg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(base.mode & ATTR_BOLD) {
|
if(base.mode & ATTR_BOLD) {
|
||||||
if(BETWEEN(base.fg, 0, 7)) {
|
if(BETWEEN(base.fg, 0, 7)) {
|
||||||
/* basic system colors */
|
/* basic system colors */
|
||||||
@ -3229,7 +3229,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
colfg.green = ~fg->color.green;
|
colfg.green = ~fg->color.green;
|
||||||
colfg.blue = ~fg->color.blue;
|
colfg.blue = ~fg->color.blue;
|
||||||
colfg.alpha = fg->color.alpha;
|
colfg.alpha = fg->color.alpha;
|
||||||
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg);
|
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg,
|
||||||
|
&revfg);
|
||||||
fg = &revfg;
|
fg = &revfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3240,7 +3241,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
colbg.green = ~bg->color.green;
|
colbg.green = ~bg->color.green;
|
||||||
colbg.blue = ~bg->color.blue;
|
colbg.blue = ~bg->color.blue;
|
||||||
colbg.alpha = bg->color.alpha;
|
colbg.alpha = bg->color.alpha;
|
||||||
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &revbg);
|
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg,
|
||||||
|
&revbg);
|
||||||
bg = &revbg;
|
bg = &revbg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3343,6 +3345,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
* Nothing was found in the cache. Now use
|
* Nothing was found in the cache. Now use
|
||||||
* some dozen of Fontconfig calls to get the
|
* some dozen of Fontconfig calls to get the
|
||||||
* font for one single character.
|
* font for one single character.
|
||||||
|
*
|
||||||
|
* Xft and fontconfig are design failures.
|
||||||
*/
|
*/
|
||||||
fcpattern = FcPatternDuplicate(font->pattern);
|
fcpattern = FcPatternDuplicate(font->pattern);
|
||||||
fccharset = FcCharSetCreate();
|
fccharset = FcCharSetCreate();
|
||||||
@ -3386,6 +3390,12 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
|
|||||||
xp += xw.cw * wcwidth(u8char);
|
xp += xw.cw * wcwidth(u8char);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is how the loop above actually should be. Why does the
|
||||||
|
* application have to care about font details?
|
||||||
|
*
|
||||||
|
* I have to repeat: Xft and Fontconfig are design failures.
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
XftDrawStringUtf8(xw.draw, fg, font->set, winx,
|
XftDrawStringUtf8(xw.draw, fg, font->set, winx,
|
||||||
winy + font->ascent, (FcChar8 *)s, bytelen);
|
winy + font->ascent, (FcChar8 *)s, bytelen);
|
||||||
|
Loading…
Reference in New Issue
Block a user