OK.... I think I have a 'fix' but I'm not sure about it (for some reason Pd was throwing key events to the "last canvas on which a text editor had opened" but now I can't see why one would do that, and anyway the 'feature' was broken since 0.43 and I never saw anything wrong... s oI think it's safe just to take that 'feature' out. I think I can just release the fix as 0.45-1 but am going to wait until I'm wider awake. Here's a patch if anyone wants to try it:
--------------- >From fff0b83e6fb500672a4706487358d612db7fe543 Mon Sep 17 00:00:00 2001 From: Miller Puckette <m...@ucsd.edu> Date: Tue, 27 Aug 2013 22:01:22 -0700 Subject: [PATCH] Took out the canvas_editing business to try to fix the backspace-in-dialog- getting-sent-to-canvas bug --- src/g_canvas.c | 3 --- src/g_canvas.h | 1 - src/g_editor.c | 4 ++-- src/g_rtext.c | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/g_canvas.c b/src/g_canvas.c index 3d38f1c..54079e3 100644 --- a/src/g_canvas.c +++ b/src/g_canvas.c @@ -42,7 +42,6 @@ desktops because the borders have both window title area and menus. */ extern t_pd *newest; t_class *canvas_class; int canvas_dspstate; /* whether DSP is on or off */ -t_canvas *canvas_editing; /* last canvas to start text edting */ t_canvas *canvas_whichfind; /* last canvas we did a find in */ t_canvas *canvas_list; /* list of all root canvases */ @@ -725,8 +724,6 @@ void canvas_free(t_canvas *x) t_gobj *y; int dspstate = canvas_suspend_dsp(); canvas_noundo(x); - if (canvas_editing == x) - canvas_editing = 0; if (canvas_whichfind == x) canvas_whichfind = 0; glist_noselect(x); diff --git a/src/g_canvas.h b/src/g_canvas.h index ba6d979..3871444 100644 --- a/src/g_canvas.h +++ b/src/g_canvas.h @@ -336,7 +336,6 @@ struct _parentwidgetbehavior #define CURSOR_EDITMODE_RESIZE 7 EXTERN void canvas_setcursor(t_glist *x, unsigned int cursornum); -extern t_canvas *canvas_editing; /* last canvas to start text edting */ extern t_canvas *canvas_whichfind; /* last canvas we did a find in */ extern t_canvas *canvas_list; /* list of all root canvases */ extern t_class *vinlet_class, *voutlet_class; diff --git a/src/g_editor.c b/src/g_editor.c index 85628b9..90bb78a 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -2675,8 +2675,8 @@ static void canvas_texteditor(t_canvas *x) void glob_key(void *dummy, t_symbol *s, int ac, t_atom *av) { - /* canvas_editing can be zero; canvas_key checks for that */ - canvas_key(canvas_editing, s, ac, av); + /* canvas_key checks for zero */ + canvas_key(0, s, ac, av); } void canvas_editmode(t_canvas *x, t_floatarg state) diff --git a/src/g_rtext.c b/src/g_rtext.c index 02f7400..f7aa451 100644 --- a/src/g_rtext.c +++ b/src/g_rtext.c @@ -449,7 +449,6 @@ void rtext_select(t_rtext *x, int state) t_canvas *canvas = glist_getcanvas(glist); sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas, x->x_tag, (state? "blue" : "black")); - canvas_editing = canvas; } void rtext_activate(t_rtext *x, int state) -- 1.7.11.7 ------------ cheers Miller On Tue, Aug 27, 2013 at 11:55:58PM -0400, J Oliver wrote: > it happens consistently in os x 10.7.5. > > 1) create a number box. > > 2a) If it is selected and I try to delete the "5" in "width" it deletes the > number box. > > 2b) If it is not selected, it won't even delete the "5" in "width". > > J > > On Aug 27, 2013, at 10:53 PM, Miller Puckette wrote: > > > Aha - I can make this malfunction... don't know what's causing it yet. It's > > quite n abupt surprise when it happens :) > > > > On Tue, Aug 27, 2013 at 08:37:25PM +0200, Max wrote: > >> Am 27.08.2013 um 18:57 schrieb IOhannes m zmölnig <zmoel...@iem.at>: > >>> On 08/27/13 12:30, Max wrote: > >>>> There is one little annoyance: > >>>> if you select a GUI object, right click fro the properties and then go > >>>> to change on of the fields in the dialog, you can't hit backspace, > >>>> because this deletes the object and closes the properties dialog. > >>>> Somehow the backspace takes effect on the canvas instead of the numbers > >>>> of say changing the values of a slider. > >>> > >>> not on my pd-0.45.0. > >>> this is on debian with xfce4, focus-follows-mouse policy. > >> > >> Are you sure the object is selected? the error is occurring for me on OS X > >> 10.8, haven't tried other platforms. > >> m. > >> > > > > > > > >> _______________________________________________ > >> Pd-list@iem.at mailing list > >> UNSUBSCRIBE and account-management -> > >> http://lists.puredata.info/listinfo/pd-list > > > > > > _______________________________________________ > > Pd-list@iem.at mailing list > > UNSUBSCRIBE and account-management -> > > http://lists.puredata.info/listinfo/pd-list > _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list