diff options
author | Devin J. Pohly <djpohly@djpohly.com> | 2010-10-25 16:00:10 -0400 |
---|---|---|
committer | Devin J. Pohly <djpohly@djpohly.com> | 2010-10-25 16:00:10 -0400 |
commit | 638a30359d26c1f84a87f0f8df17df1765068029 (patch) | |
tree | 77b5f1744e4b54a7475cf980edd2a37530a21677 | |
parent | d85f7319a2c0d0bc53c1e0be6539284823fe7389 (diff) | |
download | st-638a30359d26c1f84a87f0f8df17df1765068029.tar.gz st-638a30359d26c1f84a87f0f8df17df1765068029.tar.bz2 |
get rid of artifacts in border on resize down
-rw-r--r-- | st.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1274,9 +1274,17 @@ xresize(int col, int row) { if(xw.bufw > oldw) XFillRectangle(xw.dis, newbuf, dc.gc, oldw, 0, xw.bufw-oldw, MIN(xw.bufh, oldh)); + else if(xw.bufw < oldw && (BORDER > 0 || xw.w > xw.bufw)) + XClearArea(xw.dis, xw.win, BORDER+xw.bufw, BORDER, + xw.w-xw.bufh-BORDER, BORDER+MIN(xw.bufh, oldh), + False); if(xw.bufh > oldh) XFillRectangle(xw.dis, newbuf, dc.gc, 0, oldh, xw.bufw, xw.bufh-oldh); + else if(xw.bufh < oldh && (BORDER > 0 || xw.h > xw.bufh)) + XClearArea(xw.dis, xw.win, BORDER, BORDER+xw.bufh, + xw.w-2*BORDER, xw.h-xw.bufh-BORDER, + False); xw.buf = newbuf; } |