shithub: riscv

Download patch

ref: b3d72310137266939589f2cdaff5671172bbb101
parent: 9d212c517d0aea6bc0e70a891e83aa4c1d139114
author: cinap_lenrek <[email protected]>
date: Sun Jul 22 15:25:31 EDT 2012

paint: wait for mouseup after floodfill

--- a/sys/src/cmd/paint.c
+++ b/sys/src/cmd/paint.c
@@ -609,6 +609,9 @@
 					save(canvas->r, 1);
 					floodfill(p, img);
 					update(nil);
+					/* wait for mouse release */
+					while(event(&e) == Emouse && (e.mouse.buttons & 7) != 0)
+						;
 					break;
 				}
 				r = Rect(p.x-brush, p.y-brush, p.x+brush+1, p.y+brush+1);