[hackers] [st] Setting the surrounding border to defaultbg. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Sun, 10 Feb 2013 16:38:54 +0100

commit 8a9475a0dd9b8751b9b0ed4c7da4db09232e318e
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Sun Feb 10 16:36:03 2013 +0100

    Setting the surrounding border to defaultbg.
    
    Thanks Stephen Caraher <moskvax_AT_gmail.com>!

diff --git a/st.c b/st.c
index 4d1c1bb..08cda34 100644
--- a/st.c
+++ b/st.c
_AT_@ -2275,7 +2275,7 @@ xresize(int col, int row) {
                 XFreePixmap(xw.dpy, xw.buf);
                 xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h,
                                 DefaultDepth(xw.dpy, xw.scr));
- XSetForeground(xw.dpy, dc.gc, 0);
+ XSetForeground(xw.dpy, dc.gc, dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg].pixel);
                 XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, xw.w, xw.h);
         }
 
_AT_@ -2570,7 +2570,7 @@ xinit(void) {
                                 &gcvalues);
                 xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h,
                                 DefaultDepth(xw.dpy, xw.scr));
- XSetForeground(xw.dpy, dc.gc, 0);
+ XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel);
                 XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, xw.w, xw.h);
                 //xw.buf = xw.win;
         /*
_AT_@ -2894,7 +2894,7 @@ draw(void) {
         } else {
                 XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, xw.w,
                                 xw.h, 0, 0);
- XSetForeground(xw.dpy, dc.gc, 0);
+ XSetForeground(xw.dpy, dc.gc, dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg].pixel);
         }
 }
 
Received on Sun Feb 10 2013 - 16:38:54 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 21 2013 - 19:26:23 CET