hi Miller,
sorry to bother you yet again, it is my fault by sending these patches too hastily... but you seem to have used the first (the ``common sense'') tcl/tk8.4 patch. So, test6 leaves zombie connection lines while being mapped-in back from another virtual desktop, or from being minimized.
In former releases, the <Unmap> event binding was commented out. Therefore, all subsequent <Map> events were simply ignored too -- cf. ``if (!glist_isvisible(x))'' condition in canvas_map().
The quick fix is to do just that -- comment out line 914 of pd.tk. In case you think the proper fix would be really handling _all_ map/unmap events, here is the patch on g_canvas.c.
It is not tested, though (I rather rarely use a computer these days).
Krzysztof
--- g_canvas.c~ 2003-06-03 06:37:07.000000000 +0200 +++ g_canvas.c 2003-07-04 16:18:13.000000000 +0200 @@ -57,6 +57,7 @@ static void canvas_start_dsp(void); static void canvas_stop_dsp(void); static void canvas_drawlines(t_canvas *x); +static void canvas_deletelines(t_canvas *x); static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2); static void canvas_reflecttitle(t_canvas *x); static void canvas_addtolist(t_canvas *x); @@ -642,6 +643,7 @@ for (y = x->gl_list; y; y = y->g_next) gobj_vis(y, x, 0); x->gl_mapped = 0; + canvas_deletelines(x); } } } @@ -875,6 +877,15 @@ } }
+static void canvas_deletelines(t_canvas *x) +{ + t_linetraverser t; + t_outconnect *oc; + linetraverser_start(&t, x); + while (oc = linetraverser_next(&t)) + sys_vgui(".x%x.c delete l%x\n", glist_getcanvas(x), oc); +} + void canvas_fixlinesfor(t_canvas *x, t_text *text)