diff options
Diffstat (limited to 'swt.c')
| -rw-r--r-- | swt.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -158,8 +158,8 @@ void wclipcopy() { void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) { draw_rect( win.canvas, - ox * win.fontcache->box.width, - oy * win.fontcache->box.height, + borderpx + ox * win.fontcache->box.width, + borderpx + oy * win.fontcache->box.height, win.fontcache->box.width, win.fontcache->box.height, colors[og.bg] @@ -168,14 +168,14 @@ void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) { win.canvas, win.fontcache, og.u, - ox * win.fontcache->box.width, - oy * win.fontcache->box.height + win.fontcache->fontsize, + borderpx + ox * win.fontcache->box.width, + borderpx + oy * win.fontcache->box.height + win.fontcache->fontsize, colors[og.fg] ); draw_rect( win.canvas, - cx * win.fontcache->box.width, - cy * win.fontcache->box.height, + borderpx + cx * win.fontcache->box.width, + borderpx + cy * win.fontcache->box.height, win.fontcache->box.width, win.fontcache->box.height, colors[g.fg] @@ -184,8 +184,8 @@ void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) { win.canvas, win.fontcache, g.u, - cx * win.fontcache->box.width, - cy * win.fontcache->box.height + win.fontcache->fontsize, + borderpx + cx * win.fontcache->box.width, + borderpx + cy * win.fontcache->box.height + win.fontcache->fontsize, colors[g.bg] ); } @@ -196,8 +196,8 @@ void wdrawline(Line line, int x1, int y1, int x2) { draw_rect( win.canvas, - x1 * win.fontcache->box.width, - y1 * win.fontcache->box.height, + borderpx + x1 * win.fontcache->box.width, + borderpx + y1 * win.fontcache->box.height, x2 * win.fontcache->box.width, win.fontcache->box.height, colors[defaultbg] @@ -206,8 +206,8 @@ void wdrawline(Line line, int x1, int y1, int x2) { for (x = x1; x < x2; x++) { draw_rect( win.canvas, - x * win.fontcache->box.width, - y1 * win.fontcache->box.height, + borderpx + x * win.fontcache->box.width, + borderpx + y1 * win.fontcache->box.height, 10, win.fontcache->box.height, colors[line[x].bg] @@ -216,8 +216,8 @@ void wdrawline(Line line, int x1, int y1, int x2) { win.canvas, win.fontcache, line[x].u, - x * win.fontcache->box.width, - y1 * win.fontcache->box.height + win.fontcache->fontsize, + borderpx + x * win.fontcache->box.width, + borderpx + y1 * win.fontcache->box.height + win.fontcache->fontsize, colors[line[x].fg] ); } @@ -352,8 +352,8 @@ surface_configure(void *data, struct xdg_surface *surface, uint32_t serial) free_drw(win.canvas); } win.canvas = create_drw(client.shm, win.width, win.height); - ttywidth = win.width / win.fontcache->box.width; - ttyheight = win.height / win.fontcache->box.height; + ttywidth = (win.width - 2 * borderpx) / win.fontcache->box.width; + ttyheight = (win.height - 2 * borderpx) / win.fontcache->box.height; tresize(ttywidth, ttyheight); ttyresize(ttywidth, ttyheight); draw_frame(); |