ref: baf20a548b903bb76f94045645f9b679383bb728
parent: b2efac468744ce418329438fe413cea578d35d61
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jun 26 14:14:34 EDT 2016
rio: move the test if w is allowed to change cursor into wsetcursor() the onscreen cursor shows the cursor of the current focused window or the window it points at. if there is no window, then we set the default cursor (nil).
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -1194,8 +1194,7 @@
case Holdoff:
if(w->i==nil)
break;
- if(w==input)
- wsetcursor(w, FALSE);
+ wsetcursor(w, FALSE);
wrepaint(w);
flushimage(display, 1);
break;
@@ -1295,9 +1294,9 @@
{
Cursor *p;
- if(menuing || sweeping)
+ if(menuing || sweeping || (w!=input && wpointto(mouse->xy)!=w))
return;
- if(w==nil || Dx(w->screenr)<=0 || wpointto(mouse->xy)!=w)
+ if(w==nil)
p = nil;
else {
p = w->cursorp;
--- a/sys/src/cmd/rio/xfid.c
+++ b/sys/src/cmd/rio/xfid.c
@@ -333,8 +333,7 @@
break;
case Qcursor:
w->cursorp = nil;
- if(w==input)
- wsetcursor(w, FALSE);
+ wsetcursor(w, FALSE);
break;
case Qkbd:
w->kbdopen = FALSE;
@@ -479,8 +478,7 @@
memmove(w->cursor.clr, x->data+2*4, 2*2*16);
w->cursorp = &w->cursor;
}
- if(w==input)
- wsetcursor(w, TRUE);
+ wsetcursor(w, TRUE);
break;
case Qlabel: