Introduction
Introduction Statistics Contact Development Disclaimer Help
tapply post-XDBE patch BORDER fix - st - [fork] customized build of st, the sim…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit c6853fe18564437fe0a4cb06565a0a7d63d40b5a
parent 94771d05886fbdd2422e66b7c0256ab27fa375cb
Author: Brandon Invergo <[email protected]>
Date: Fri, 3 Aug 2012 14:46:40 +0200
apply post-XDBE patch BORDER fix
Diffstat:
M st.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -186,8 +186,6 @@ typedef struct {
int scr;
int w; /* window width */
int h; /* window height */
- int bufw; /* pixmap width */
- int bufh; /* pixmap height */
int ch; /* char height */
int cw; /* char width */
char state; /* focus, redraw, visible */
t@@ -1621,8 +1619,8 @@ tresize(int col, int row) {
void
xresize(int col, int row) {
- xw.bufw = MAX(1, col * xw.cw);
- xw.bufh = MAX(1, row * xw.ch);
+ xw.w = MAX(1, 2*BORDER + col * xw.cw);
+ xw.h = MAX(1, 2*BORDER + row * xw.ch);
}
void
t@@ -1671,7 +1669,7 @@ void
xclear(int x1, int y1, int x2, int y2) {
XSetForeground(xw.dpy, dc.gc, dc.col[IS_SET(MODE_REVERSE) ? DefaultFG …
XFillRectangle(xw.dpy, xw.buf, dc.gc,
- x1 * xw.cw, y1 * xw.ch,
+ BORDER + x1 * xw.cw, BORDER + y1 * xw.ch,
(x2-x1+1) * xw.cw, (y2-y1+1) * xw.ch);
}
t@@ -1757,10 +1755,8 @@ xinit(void) {
xloadcols();
/* window - default size */
- xw.bufh = term.row * xw.ch;
- xw.bufw = term.col * xw.cw;
- xw.h = xw.bufh + 2*BORDER;
- xw.w = xw.bufw + 2*BORDER;
+ xw.h = 2*BORDER + term.row * xw.ch;
+ xw.w = 2*BORDER + term.col * xw.cw;
attrs.background_pixel = dc.col[DefaultBG];
attrs.border_pixel = dc.col[DefaultBG];
t@@ -1807,7 +1803,7 @@ xinit(void) {
void
xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
int fg = base.fg, bg = base.bg, temp;
- int winx = x*xw.cw, winy = y*xw.ch + dc.font.ascent, width = charlen*x…
+ int winx = BORDER+x*xw.cw, winy = BORDER+y*xw.ch + dc.font.ascent, wid…
XFontSet fontset = dc.font.set;
int i;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.