X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=x.c;h=04e2e053b9f4a505c5fe2fa255d4ed6a9806cfce;hb=323d38da20c8a1d295ab1dbc0fc7ce947ef824e1;hp=24f699169c2196728905071fbd2c9d8dace5c5fd;hpb=416dd257274fd334be082b1138338adffa3e2d5e;p=st.git diff --git a/x.c b/x.c index 24f6991..04e2e05 100644 --- a/x.c +++ b/x.c @@ -187,6 +187,7 @@ static void (*handler[LASTEvent])(XEvent *) = { static DC dc; static XWindow xw; static XSelection xsel; +static TermWindow win; enum window_state { WIN_VISIBLE = 1, @@ -1615,6 +1616,16 @@ xsetpointermotion(int set) XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); } +int +xsetcursor(int cursor) +{ + DEFAULT(cursor, 1); + if (!BETWEEN(cursor, 0, 6)) + return 1; + win.cursor = cursor; + return 0; +} + void xseturgency(int add) {