~mil/sxmo-st

f85f30f684f47e6fd23fdb8edb6aa54b3a67d8b6 — Steve Ward 4 years ago c20f35e
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).
1 files changed, 4 insertions(+), 5 deletions(-)

M x.c
M x.c => x.c +4 -5
@@ 1597,8 1597,8 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
	/* draw the new one */
	if (IS_SET(MODE_FOCUSED)) {
		switch (win.cursor) {
		case 7: /* st extension: snowman (U+2603) */
			g.u = 0x2603;
		case 7: /* st extension */
			g.u = 0x2603; /* snowman (U+2603) */
			/* FALLTHROUGH */
		case 0: /* Blinking Block */
		case 1: /* Blinking Block (Default) */


@@ 1761,8 1761,7 @@ xsetmode(int set, unsigned int flags)
int
xsetcursor(int cursor)
{
	DEFAULT(cursor, 1);
	if (!BETWEEN(cursor, 0, 6))
	if (!BETWEEN(cursor, 0, 7)) /* 7: st extension */
		return 1;
	win.cursor = cursor;
	return 0;


@@ 2113,7 2112,7 @@ main(int argc, char *argv[])
{
	xw.l = xw.t = 0;
	xw.isfixed = False;
	win.cursor = cursorshape;
	xsetcursor(cursorshape);

	ARGBEGIN {
	case 'a':