diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index 59796b76b755395b70097bd56f7d7583d6f1627c..2a70a0b6d9482ed1b69765429360837f43b6e455 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -2752,7 +2752,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which, t_gobj *y; int shiftmod, runmode, altmod, doublemod = 0, rightclick; - int x1=0, y1=0, x2=0, y2=0, clickreturned = 0, tmpclickreturned = 0; + int x1=0, y1=0, x2=0, y2=0, clickreturned = 0; t_gobj *yclick = NULL; //fprintf(stderr,"MAIN canvas_doclick %d %d %d %d %d\n", xpos, ypos, which, mod, doit); @@ -2831,15 +2831,12 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which, for (y = x->gl_list; y; y = y->g_next) { // check if the object wants to be clicked (we pick the topmost clickable) - if (canvas_hitbox(x, y, xpos, ypos, &x1, &y1, &x2, &y2) && (tmpclickreturned = gobj_click(y, x, xpos, ypos, - shiftmod, ((mod & CTRLMOD) && (!x->gl_edit)) || altmod, - 0, 0))) { + if (canvas_hitbox(x, y, xpos, ypos, &x1, &y1, &x2, &y2)) { yclick = y; - clickreturned = tmpclickreturned; //fprintf(stderr," MAIN found clickable %d\n", clickreturned); } } - if (yclick && doit) { + if (yclick) { clickreturned = gobj_click(yclick, x, xpos, ypos, shiftmod, ((mod & CTRLMOD) && (!x->gl_edit)) || altmod, 0, doit); diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index 6aa78f9ef94cb233a0f96fc4dc370279a9f0fc65..ec75c9d6b3a24ca6bcf9394a19fe3f8c8ab2c18d 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -1327,11 +1327,11 @@ static void graph_motion(void *z, t_floatarg dx, t_floatarg dy) static int graph_click(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit) { - //fprintf(stderr, "graph_click\n"); + fprintf(stderr, "graph_click %d\n", doit); t_glist *x = (t_glist *)z; t_gobj *y, *clickme = NULL; int clickreturned = 0; - int tmpclickreturned = 0; + //int tmpclickreturned = 0; if (!x->gl_isgraph) return (text_widgetbehavior.w_clickfn(z, glist, xpix, ypix, shift, alt, dbl, doit)); @@ -1343,15 +1343,12 @@ static int graph_click(t_gobj *z, struct _glist *glist, for (y = x->gl_list; y; y = y->g_next) { /* check if the object wants to be clicked */ - if (canvas_hitbox(x, y, xpix, ypix, &x1, &y1, &x2, &y2) - && (tmpclickreturned = gobj_click(y, x, xpix, ypix, - shift, alt, 0, 0))) { + if (canvas_hitbox(x, y, xpix, ypix, &x1, &y1, &x2, &y2)) { clickme = y; - clickreturned = tmpclickreturned; //fprintf(stderr," found clickable %d\n", clickreturned); } } - if (clickme != NULL && doit) { + if (clickme) { //fprintf(stderr," clicking\n"); clickreturned = gobj_click(clickme, x, xpix, ypix, shift, alt, 0, doit);