From 54d2424a7cab7fe1808f7bdb7acade6af0e3428a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 21 Oct 2012 18:27:43 +0200 Subject: rio: fix cursor for sizing nocurrent window wrepaint() used to also set the cursor for the window if it was current. this reset the corner cursors on bandresize when one tried to attempt to size a window that was not current. make repaint just repaint the window and border. set cursor explicitely for hold toggle. --- sys/src/cmd/rio/wind.c | 9 ++++++--- sys/src/cmd/rio/xfid.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'sys/src/cmd/rio') diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c index b45a3624d..313247576 100644 --- a/sys/src/cmd/rio/wind.c +++ b/sys/src/cmd/rio/wind.c @@ -660,6 +660,7 @@ wkeyctl(Window *w, Rune r) --w->holding; else w->holding++; + wsetcursor(w, 0); wrepaint(w); if(r == Kesc) return; @@ -732,10 +733,9 @@ wrepaint(Window *w) wsetcols(w); if(!w->mouseopen) frredraw(w); - if(w == input){ + if(w == input) wborder(w, Selborder); - wsetcursor(w, 0); - }else + else wborder(w, Unselborder); } @@ -1114,6 +1114,9 @@ wctlmesg(Window *w, int m, Rectangle r, Image *i) break; case Holdon: case Holdoff: + if(w == input) + wsetcursor(w, 0); + /* no break */ case Repaint: if(w->deleted) break; diff --git a/sys/src/cmd/rio/xfid.c b/sys/src/cmd/rio/xfid.c index acd61c8ac..9359bc12c 100644 --- a/sys/src/cmd/rio/xfid.c +++ b/sys/src/cmd/rio/xfid.c @@ -442,13 +442,13 @@ xfidwrite(Xfid *x) break; } if(strncmp(x->data, "holdoff", 7)==0 && w->holding){ - if(--w->holding == FALSE) + if(--w->holding == 0) wsendctlmesg(w, Holdoff, ZR, nil); break; } if(strncmp(x->data, "rawon", 5)==0){ if(w->holding){ - w->holding = FALSE; + w->holding = 0; wsendctlmesg(w, Holdoff, ZR, nil); } if(w->rawing++ == 0) -- cgit v1.2.3