Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
st.info: do not prevent st from displaying attributes
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
f2b3095
..
2594c65
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-1151,8
+1151,7
@@
selnotify(XEvent *e)
* Deleting the property again tells the selection owner to send the
* next data chunk in the property.
*/
* Deleting the property again tells the selection owner to send the
* next data chunk in the property.
*/
- if (e->type == PropertyNotify)
- XDeleteProperty(xw.dpy, xw.win, (int)property);
+ XDeleteProperty(xw.dpy, xw.win, (int)property);
}
void
}
void
@@
-1404,9
+1403,9
@@
stty(void)
if ((n = strlen(s)) > siz-1)
die("stty parameter length too long\n");
*q++ = ' ';
if ((n = strlen(s)) > siz-1)
die("stty parameter length too long\n");
*q++ = ' ';
-
q =
memcpy(q, s, n);
+ memcpy(q, s, n);
q += n;
q += n;
- siz-= n + 1;
+ siz
-= n + 1;
}
*q = '\0';
if (system(cmd) != 0)
}
*q = '\0';
if (system(cmd) != 0)
@@
-3280,7
+3279,7
@@
xloadfont(Font *f, FcPattern *pattern)
FcResult result;
XGlyphInfo extents;
FcResult result;
XGlyphInfo extents;
- match =
FcFontMatch(NULL
, pattern, &result);
+ match =
XftFontMatch(xw.dpy, xw.scr
, pattern, &result);
if (!match)
return 1;
if (!match)
return 1;
@@
-3291,7
+3290,7
@@
xloadfont(Font *f, FcPattern *pattern)
XftTextExtentsUtf8(xw.dpy, f->match,
(const FcChar8 *) ascii_printable,
XftTextExtentsUtf8(xw.dpy, f->match,
(const FcChar8 *) ascii_printable,
-
LEN
(ascii_printable), &extents);
+
strlen
(ascii_printable), &extents);
f->set = NULL;
f->pattern = FcPatternDuplicate(pattern);
f->set = NULL;
f->pattern = FcPatternDuplicate(pattern);
@@
-3302,7
+3301,7
@@
xloadfont(Font *f, FcPattern *pattern)
f->rbearing = f->match->max_advance_width;
f->height = f->ascent + f->descent;
f->rbearing = f->match->max_advance_width;
f->height = f->ascent + f->descent;
- f->width = DIVCEIL(extents.xOff,
LEN
(ascii_printable));
+ f->width = DIVCEIL(extents.xOff,
strlen
(ascii_printable));
return 0;
}
return 0;
}
@@
-3346,9
+3345,6
@@
xloadfonts(char *fontstr, double fontsize)
defaultfontsize = usedfontsize;
}
defaultfontsize = usedfontsize;
}
- FcConfigSubstitute(0, pattern, FcMatchPattern);
- FcDefaultSubstitute(pattern);
-
if (xloadfont(&dc.font, pattern))
die("st: can't open font %s\n", fontstr);
if (xloadfont(&dc.font, pattern))
die("st: can't open font %s\n", fontstr);