diff options
| author | Russ Cox <rsc@swtch.com> | 2018-11-15 20:22:59 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@swtch.com> | 2018-11-15 20:39:35 -0500 |
| commit | 8581c2b56763d7787604c8c833d2bd78bdc6a466 (patch) | |
| tree | 921221af510ad74a89731d9d9cb308e375039f06 /src/libdraw/drawclient.c | |
| parent | 9af9ceca26596d562a3ae89fda70bad9f8822ab0 (diff) | |
| download | plan9port-8581c2b56763d7787604c8c833d2bd78bdc6a466.tar.gz plan9port-8581c2b56763d7787604c8c833d2bd78bdc6a466.zip | |
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.
Diffstat (limited to 'src/libdraw/drawclient.c')
| -rw-r--r-- | src/libdraw/drawclient.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |
