]> git.lizzy.rs Git - plan9front.git/commitdiff
rio: fix cursor for sizing nocurrent window
authorcinap_lenrek <cinap_lenrek@gmx.de>
Sun, 21 Oct 2012 16:27:43 +0000 (18:27 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Sun, 21 Oct 2012 16:27:43 +0000 (18:27 +0200)
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
sys/src/cmd/rio/xfid.c

index b45a3624d1e3281e9ef0946d7229ffdf72dae5f2..313247576f3609617b9ac8d61aac5dc24473c9b9 100644 (file)
@@ -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;
index acd61c8ac7b7b06c97f7e5a8603fca988efcc849..9359bc12c4b6c30df1b7475172cc0a026161117d 100644 (file)
@@ -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)