[PD-dev] Window strange behavior

Pierre Guillot guillotpierre6 at gmail.com
Mon Oct 7 21:53:26 CEST 2013


Hi,
I've got a strange behavior in my patch with my GUI externals.

First,  I create a canvas :

sys_vgui("canvas %s -borderwidth 0 -width %d -height %d
\n",  x->e_drawing_id->s_name, (int)x->e_rect.width, (int)x->e_rect.height);

Then I bind the mouse to the canvas :

sys_vgui("bind %s <%sButtonPress> {+pdsend {%s mousedown %%x %%y %i}}\n",
 x->e_drawing_id->s_name, modifiers_list[i], x->e_name_rcv->s_name, i);

Then I create a window with the canvas :

sys_vgui("%s create window %d %d -anchor nw -window %s -tags %s -width %d
-height %d\n", x->e_canvas_id->s_name,
 (int)x->e_obj.te_xpix + 4, (int)x->e_obj.te_ypix+ 4,
 x->e_drawing_id->s_name,  x->e_window_id->s_name,
  (int)x->e_rect.width - 8, (int)x->e_rect.height - 8);

When I open a patch with the object, everything works fine (my object and
the patch). But when I reduce the patch and "reopen" it, Pure data have a
strange behavior : I can'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't figure out what append...


here the link to file :

https://github.com/pierreguillot/PdEnhanced/blob/master/Sources/ebox/ebox_window.c

and to the object (hoa.space) :

https://github.com/CICM/HoaLibrary/tree/master/PureData/builds

If anybody can help me or have an idea, I'll be so grateful. Thanks in
advance for any help.

Best,


Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20131007/78de69f9/attachment.htm>


More information about the Pd-dev mailing list