<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">I&#39;ve got a strange behavior in my patch with my GUI externals.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><p>First,  I create a canvas :</p><p>sys_vgui(&quot;canvas %s -borderwidth 0 -width %d -height %d \n&quot;,  x-&gt;e_drawing_id-&gt;s_name, (int)x-&gt;e_rect.width, (int)x-&gt;e_rect.height);</p>
<p>Then I bind the mouse to the canvas :</p><p>sys_vgui(&quot;bind %s &lt;%sButtonPress&gt; {+pdsend {%s mousedown %%x %%y %i}}\n&quot;,   x-&gt;e_drawing_id-&gt;s_name, modifiers_list[i], x-&gt;e_name_rcv-&gt;s_name, i);</p>
<p>Then I create a window with the canvas :</p><p>sys_vgui(&quot;%s create window %d %d -anchor nw -window %s -tags %s -width %d -height %d\n&quot;, x-&gt;e_canvas_id-&gt;s_name,  (int)x-&gt;e_obj.te_xpix + 4, (int)x-&gt;e_obj.te_ypix+ 4,  x-&gt;e_drawing_id-&gt;s_name,  x-&gt;e_window_id-&gt;s_name,   (int)x-&gt;e_rect.width - 8, (int)x-&gt;e_rect.height - 8);</p>
<p>When I open a patch with the object, everything works fine (my object and the patch). But when I reduce the patch and &quot;reopen&quot; it, Pure data have a strange behavior : I can&#39;t change the edit mode (with crtl + e) anymore until I open a new patch. It seems like the patch or the mouse are no more linked. I can&#39;t figure out what append... </p>
<p><br></p><p>here the link to file : </p><p><a href="https://github.com/pierreguillot/PdEnhanced/blob/master/Sources/ebox/ebox_window.c" target="_blank">https://github.com/pierreguillot/PdEnhanced/blob/master/Sources/ebox/ebox_window.c</a><br>
</p><p>and to the object (hoa.space) :</p><p><a href="https://github.com/CICM/HoaLibrary/tree/master/PureData/builds" target="_blank">https://github.com/CICM/HoaLibrary/tree/master/PureData/builds</a><br></p><p>If anybody can help me or have an idea, I&#39;ll be so grateful. Thanks in advance for any help.</p>
<p>Best,</p><p><br></p><p>Pierre</p></div></div>