rio: cancel window selection if pointer ends outside window
[rsc] --rw-rw-r-- M 521269 glenda sys 22866 Mar 13 17:30 sys/src/cmd/rio/rio.c
/n/sourcesdump/2006/0313/plan9/sys/src/cmd/rio/rio.c:1011,1017 -
/n/sourcesdump/2006/0314/plan9/sys/src/cmd/rio/rio.c:1011,1017
w = wpointto(mouse->xy);
else
w = nil;
- if(wait)
+ if(wait){
while(mouse->buttons){
if(mouse->buttons!=4 && w !=nil){ /* cancel */
cornercursor(input, mouse->xy, 0);
/n/sourcesdump/2006/0313/plan9/sys/src/cmd/rio/rio.c:1019,1024 -
/n/sourcesdump/2006/0314/plan9/sys/src/cmd/rio/rio.c:1019,1027
}
readmouse(mousectl);
}
+ if(w != nil && wpointto(mouse->xy) != w)
+ w = nil;
+ }
cornercursor(input, mouse->xy, 0);
moveto(mousectl, mouse->xy); /* force cursor update; ugly */
menuing = FALSE;
|