cptaffe / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

libdraw: enter()/eenter() flickers when moving mouse over slow connection #236

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when running a draw program that uses enter/eenter, the box will flicker when 
you move the mouse outside of the enter box's rect. trivial fix attached for 
enter().

it should probably not redraw at all until a click, not just movement inside or 
outside the box. and perhaps, it should terminate with a click outside the box, 
not just inside, since it captures the mouse anyway.

diff -r 36d424fbbf09 sys/src/libdraw/enter.c
--- a/sys/src/libdraw/enter.c   Fri Jan 02 22:53:59 2015 -0500
+++ b/sys/src/libdraw/enter.c   Mon Jan 05 17:15:48 2015 -0800
@@ -120,6 +120,7 @@
        }
        flushimage(display, 1);

+nodraw:
        switch(alt(a)){
        case -1:
            done = 1;
@@ -194,7 +195,7 @@
        case 1:
            if(!ptinrect(m.xy, r)){
                down = 0;
-               continue;
+               goto nodraw;
            }
            if(m.buttons & 7){
                down = 1;

Original issue reported on code.google.com by mischief@offblast.org on 7 Jan 2015 at 5:51

GoogleCodeExporter commented 9 years ago
lgtm, also check eenter().

Original comment by cinap_le...@felloff.net on 9 Jan 2015 at 4:03

GoogleCodeExporter commented 9 years ago
This issue was closed by revision f0be8cddca55.

Original comment by mischief@offblast.org on 9 Jan 2015 at 11:42