st

Custom st fork
git clone git://git.deurzen.net/st
Log | Files | Refs | README | LICENSE

commit 7e3612e81ba321e656a8f90020d8450b6709e0a3
parent dca9f7b08e0842d30210b8021e7bcf1b819df5ee
Author: deurzen <m.deurzen@tum.de>
Date:   Thu, 14 Jan 2021 01:52:50 +0100

applies st-swapmouse-0.8.4.diff

Diffstat:
Mx.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/x.c b/x.c @@ -261,6 +261,9 @@ static char *opt_title = NULL; static int oldbutton = 3; /* button event on startup: 3 = release */ +static Cursor cursor; +static XColor xmousefg, xmousebg; + void clipcopy(const Arg *dummy) { @@ -1122,10 +1125,8 @@ void xinit(int cols, int rows) { XGCValues gcvalues; - Cursor cursor; Window parent; pid_t thispid = getpid(); - XColor xmousefg, xmousebg; if (!(xw.dpy = XOpenDisplay(NULL))) die("can't open display\n"); @@ -1711,6 +1712,12 @@ xsetmode(int set, unsigned int flags) { int mode = win.mode; MODBIT(win.mode, set, flags); + if (flags & MODE_MOUSE) { + if (win.mode & MODE_MOUSE) + XUndefineCursor(xw.dpy, xw.win); + else + XDefineCursor(xw.dpy, xw.win, cursor); + } if ((win.mode & MODE_REVERSE) != (mode & MODE_REVERSE)) redraw(); }