aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ward <planet36@gmail.com>2020-05-20 22:24:55 -0400
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-05-24 13:45:42 +0200
commitdec6b530a4fddf405c1822b2cac6e2036d3c8b75 (patch)
tree9e9b1bf1d1c57b86c87711e9e8f77e2dd0197fb3
parent475a0a36cb4fda1da30f014da65988e99b222876 (diff)
downloadst-patched-dec6b530a4fddf405c1822b2cac6e2036d3c8b75.tar.bz2
st-patched-dec6b530a4fddf405c1822b2cac6e2036d3c8b75.tar.xz
st-patched-dec6b530a4fddf405c1822b2cac6e2036d3c8b75.zip
Call xsetcursor to set win.cursor in main
In xsetcursor, remove "DEFAULT(cursor, 1)" because 0 is a valid value. Increase max allowed value of cursor from 6 to 7 (st extension).
-rw-r--r--x.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/x.c b/x.c
index 1dc44d6..210f184 100644
--- a/x.c
+++ b/x.c
@@ -1526,8 +1526,8 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
1526 /* draw the new one */ 1526 /* draw the new one */
1527 if (IS_SET(MODE_FOCUSED)) { 1527 if (IS_SET(MODE_FOCUSED)) {
1528 switch (win.cursor) { 1528 switch (win.cursor) {
1529 case 7: /* st extension: snowman (U+2603) */ 1529 case 7: /* st extension */
1530 g.u = 0x2603; 1530 g.u = 0x2603; /* snowman (U+2603) */
1531 /* FALLTHROUGH */ 1531 /* FALLTHROUGH */
1532 case 0: /* Blinking Block */ 1532 case 0: /* Blinking Block */
1533 case 1: /* Blinking Block (Default) */ 1533 case 1: /* Blinking Block (Default) */
@@ -1690,8 +1690,7 @@ xsetmode(int set, unsigned int flags)
1690int 1690int
1691xsetcursor(int cursor) 1691xsetcursor(int cursor)
1692{ 1692{
1693 DEFAULT(cursor, 1); 1693 if (!BETWEEN(cursor, 0, 7)) /* 7: st extension */
1694 if (!BETWEEN(cursor, 0, 6))
1695 return 1; 1694 return 1;
1696 win.cursor = cursor; 1695 win.cursor = cursor;
1697 return 0; 1696 return 0;
@@ -1983,7 +1982,7 @@ main(int argc, char *argv[])
1983{ 1982{
1984 xw.l = xw.t = 0; 1983 xw.l = xw.t = 0;
1985 xw.isfixed = False; 1984 xw.isfixed = False;
1986 win.cursor = cursorshape; 1985 xsetcursor(cursorshape);
1987 1986
1988 ARGBEGIN { 1987 ARGBEGIN {
1989 case 'a': 1988 case 'a':