aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorFazlul Shahriar <fshahriar@gmail.com>2019-04-05 15:09:35 -0400
committerRuss Cox <rsc@golang.org>2019-04-05 15:09:35 -0400
commit7bb69ba88b8083b3eb9b3afefd8cdeae6aea2149 (patch)
tree9bdc6a2a7d6cee77c67fd9eaa57cefaa3280aaf6 /src/cmd/devdraw
parent61601587295f6d0ef1c4084530fe0318e0c72b16 (diff)
downloadplan9port-7bb69ba88b8083b3eb9b3afefd8cdeae6aea2149.tar.gz
plan9port-7bb69ba88b8083b3eb9b3afefd8cdeae6aea2149.tar.bz2
plan9port-7bb69ba88b8083b3eb9b3afefd8cdeae6aea2149.zip
libdraw,devdraw: fix compatibility with old 16x16 cursor protocol (#217)
Some libraries that depend on devdraw don't know about 32x32 cursor -- mainly 9fans.net/go/draw.
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/cocoa-srv.c8
-rw-r--r--src/cmd/devdraw/x11-srv.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/devdraw/cocoa-srv.c b/src/cmd/devdraw/cocoa-srv.c
index 329dd71f..c1cf5983 100644
--- a/src/cmd/devdraw/cocoa-srv.c
+++ b/src/cmd/devdraw/cocoa-srv.c
@@ -165,6 +165,14 @@ runmsg(Wsysmsg *m)
if(m->arrowcursor)
setcursor(nil, nil);
else
+ setcursor(&m->cursor, nil);
+ replymsg(m);
+ break;
+
+ case Tcursor2:
+ if(m->arrowcursor)
+ setcursor(nil, nil);
+ else
setcursor(&m->cursor, &m->cursor2);
replymsg(m);
break;
diff --git a/src/cmd/devdraw/x11-srv.c b/src/cmd/devdraw/x11-srv.c
index 17563f41..81416482 100644
--- a/src/cmd/devdraw/x11-srv.c
+++ b/src/cmd/devdraw/x11-srv.c
@@ -332,6 +332,7 @@ runmsg(Wsysmsg *m)
break;
case Tcursor:
+ case Tcursor2:
if(m->arrowcursor)
_xsetcursor(nil);
else