diff options
-rw-r--r-- | PATCHES | 2 | ||||
-rw-r--r-- | config.def.h | 2 | ||||
-rw-r--r-- | x.c | 24 |
3 files changed, 12 insertions, 16 deletions
@@ -1,8 +1,8 @@ -st-anysize-20220718-baa9357.diff (modified to so that text does not jitter like st-expected-anysize-0.9.diff but better) st-boxdraw_v2-0.8.5.diff st-clipboard-20180309-c5ba9c0.diff st-csi_22_23-0.8.5.diff st-desktopentry-0.8.5.diff +st-expected-anysize-0.9.diff st-scrollback-0.9.2.diff st-scrollback-reflow-0.9.2.diff st-undercurl-0.9-20240103.diff diff --git a/config.def.h b/config.def.h index 5a1a8ed..330f466 100644 --- a/config.def.h +++ b/config.def.h @@ -5,7 +5,7 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "JetBrainsMonoNL Nerd Font Mono:pixelsize=12:antialias=true:autohint=true"; +static char *font = "JetBrainsMonoNL Nerd Font Mono:size=12:antialias=true:autohint=true"; static int borderpx = 2; /* @@ -92,7 +92,6 @@ typedef XftGlyphFontSpec GlyphFontSpec; typedef struct { int tw, th; /* tty width and height */ int w, h; /* window width and height */ - int hborderpx, vborderpx; int ch; /* char height */ int cw; /* char width */ int mode; /* window state/mode flags */ @@ -345,7 +344,7 @@ ttysend(const Arg *arg) int evcol(XEvent *e) { - int x = e->xbutton.x - win.hborderpx; + int x = e->xbutton.x - borderpx; LIMIT(x, 0, win.tw - 1); return x / win.cw; } @@ -353,7 +352,7 @@ evcol(XEvent *e) int evrow(XEvent *e) { - int y = e->xbutton.y - win.vborderpx; + int y = e->xbutton.y - borderpx; LIMIT(y, 0, win.th - 1); return y / win.ch; } @@ -755,9 +754,6 @@ cresize(int width, int height) col = MAX(1, col); row = MAX(1, row); - win.hborderpx = (win.w - col * win.cw); - win.vborderpx = (win.h - row * win.ch); - tresize(col, row); xresize(col, row); ttyresize(win.tw, win.th); @@ -1171,8 +1167,8 @@ xinit(int cols, int rows) xloadcols(); /* adjust fixed window geometry */ - win.w = win.hborderpx + 2 * borderpx + cols * win.cw; - win.h = win.vborderpx + 2 * borderpx + rows * win.ch; + win.w = 2 * borderpx + cols * win.cw; + win.h = 2 * borderpx + rows * win.ch; if (xw.gm & XNegative) xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2; if (xw.gm & YNegative) @@ -1540,17 +1536,17 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i /* Intelligent cleaning up of the borders. */ if (x == 0) { - xclear(0, (y == 0)? 0 : winy, win.hborderpx, + xclear(0, (y == 0)? 0 : winy, borderpx, winy + win.ch + - ((winy + win.ch >= win.vborderpx + win.th)? win.h : 0)); + ((winy + win.ch >= borderpx + win.th)? win.h : 0)); } - if (winx + width >= win.hborderpx + win.tw) { + if (winx + width >= borderpx + win.tw) { xclear(winx + width, (y == 0)? 0 : winy, win.w, - ((winy + win.ch >= win.vborderpx + win.th)? win.h : (winy + win.ch))); + ((winy + win.ch >= borderpx + win.th)? win.h : (winy + win.ch))); } if (y == 0) - xclear(winx, 0, winx + width, win.vborderpx); - if (winy + win.ch >= win.vborderpx + win.th) + xclear(winx, 0, winx + width, borderpx); + if (winy + win.ch >= borderpx + win.th) xclear(winx, winy + win.ch, winx + width, win.h); /* Clean up the region we want to draw to. */ |