summaryrefslogtreecommitdiff
path: root/sys/src/cmd/paint.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-07-22 19:25:31 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-07-22 19:25:31 +0200
commitb3d72310137266939589f2cdaff5671172bbb101 (patch)
treeeb02147ba1dcd55b3195d07cdbe22545813849e5 /sys/src/cmd/paint.c
parent9d212c517d0aea6bc0e70a891e83aa4c1d139114 (diff)
paint: wait for mouseup after floodfill
Diffstat (limited to 'sys/src/cmd/paint.c')
-rw-r--r--sys/src/cmd/paint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/cmd/paint.c b/sys/src/cmd/paint.c
index d3b8396d9..a24a70fbe 100644
--- a/sys/src/cmd/paint.c
+++ b/sys/src/cmd/paint.c
@@ -609,6 +609,9 @@ main(int argc, char *argv[])
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);