From 8581c2b56763d7787604c8c833d2bd78bdc6a466 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 15 Nov 2018 20:22:59 -0500 Subject: libdraw: add Cursor2, a 32x32 high-res cursor Also add setcursor2, esetcursor2, and draw protocol encoding. Calls to the old setcursor, esetcursor create a 32x32 by pixel doubling when needed. --- src/libdraw/drawclient.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libdraw/drawclient.c') diff --git a/src/libdraw/drawclient.c b/src/libdraw/drawclient.c index f0c09430..de20d3a3 100644 --- a/src/libdraw/drawclient.c +++ b/src/libdraw/drawclient.c @@ -292,17 +292,22 @@ _displaymoveto(Display *d, Point p) } int -_displaycursor(Display *d, Cursor *c) +_displaycursor(Display *d, Cursor *c, Cursor2 *c2) { Wsysmsg tx, rx; tx.type = Tcursor; if(c == nil){ memset(&tx.cursor, 0, sizeof tx.cursor); + memset(&tx.cursor2, 0, sizeof tx.cursor2); tx.arrowcursor = 1; }else{ tx.arrowcursor = 0; tx.cursor = *c; + if(c2 != nil) + tx.cursor2 = *c2; + else + scalecursor(&tx.cursor2, c); } return displayrpc(d, &tx, &rx, nil); } -- cgit v1.2.3