diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-06-26 18:14:34 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-06-26 18:14:34 +0200 |
commit | baf20a548b903bb76f94045645f9b679383bb728 (patch) | |
tree | c0e49b3806adb06e26b8460c8abf2e4d8a792722 /sys/src/cmd/rio/wind.c | |
parent | b2efac468744ce418329438fe413cea578d35d61 (diff) |
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).
Diffstat (limited to 'sys/src/cmd/rio/wind.c')
-rw-r--r-- | sys/src/cmd/rio/wind.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c index fd86a6643..7dc9e30e2 100644 --- a/sys/src/cmd/rio/wind.c +++ b/sys/src/cmd/rio/wind.c @@ -1194,8 +1194,7 @@ wctlmesg(Window *w, int m, Rectangle r, void *p) 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 @@ wsetcursor(Window *w, int force) { 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; |