Commit 727088f2 authored by Albert Gräf's avatar Albert Gräf
Browse files

Merge branch 'disable-global-key-when-glist-grabbed' into release_2.15.0

parents 30695d84 6709f597
......@@ -528,7 +528,7 @@ static void knob_click(t_knob *x, t_floatarg xpos, t_floatarg ypos,
(*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
knob_bang(x);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)knob_motion,
0, xpos, ypos);
0, 0, xpos, ypos);
}
static int knob_newclick(t_gobj *z, struct _glist *glist,
......
......@@ -541,7 +541,7 @@ static int envgen_newclick(t_envgen *x, struct _glist *glist,
envgen_next_doodle(x, glist, xpos, ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) envgen_motion,
(t_glistkeyfn) envgen_key, xpos, ypos);
(t_glistkeyfn) envgen_key, 0, xpos, ypos);
x->resizing = 0;
if (x->resizeable && (xpos > wxpos + x->w.width) &&
......
......@@ -366,7 +366,7 @@ static void cube_sphere_click(t_cube_sphere *x, t_floatarg xpos, t_floatarg ypos
x->x_sel_index = sel;
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)cube_sphere_motion, 0, xpos, ypos);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)cube_sphere_motion, 0, 0, xpos, ypos);
}
}
}
......
......@@ -232,7 +232,7 @@ static int iem_event_click(t_gobj *z, struct _glist *glist, int xpix, int ypix,
if(doit)
{
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)iem_event_motion, iem_event_key, (t_float)xpix, (t_float)ypix);
(t_glistmotionfn)iem_event_motion, iem_event_key, 0, (t_float)xpix, (t_float)ypix);
outlet_anything(x->x_gui.x_obj.ob_outlet, x->x_dragg_x_y, 2, x->x_at_out);
if(x->x_gui.x_fsf.x_snd_able && x->x_gui.x_snd->s_thing)
......
......@@ -716,7 +716,7 @@ static void numberbox_matrix_click(t_numberbox_matrix *x, t_floatarg xpos, t_flo
t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)numberbox_matrix_motion, numberbox_matrix_key, xpos, ypos);
(t_glistmotionfn)numberbox_matrix_motion, numberbox_matrix_key, 0, xpos, ypos);
}
static int numberbox_matrix_newclick(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit)
......
......@@ -440,7 +440,7 @@ static void room_sim_2d_click(t_room_sim_2d *x, t_floatarg xpos, t_floatarg ypos
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)room_sim_2d_motion, 0, xpos, ypos);
(t_glistmotionfn)room_sim_2d_motion, 0, 0, xpos, ypos);
}
}
......
......@@ -532,7 +532,7 @@ static void room_sim_3d_click(t_room_sim_3d *x, t_floatarg xpos, t_floatarg ypos
x->x_pos_x = x->x_pix_src_x[sel];
x->x_pos_y = x->x_pix_src_y[sel];
x->x_pos_z = x->x_pix_src_z[sel];
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)room_sim_3d_motion, 0, xpos, ypos);
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g, (t_glistmotionfn)room_sim_3d_motion, 0, 0, xpos, ypos);
}
}
......
......@@ -195,7 +195,7 @@ static void comment_dograb(t_comment *x)
Here we use it just to prevent backspace from erasing entire text.
This has to be done also when we are already active, because
after being clicked at we have lost our previous grab. */
glist_grab(x->x_glist, (t_gobj *)x, 0, comment_grabbedkey, 0, 0);
glist_grab(x->x_glist, (t_gobj *)x, 0, comment_grabbedkey, 0, 0, 0);
}
static void comment__bboxhook(t_comment *x, t_symbol *bindsym,
......
......@@ -450,13 +450,13 @@ static void mknob_click(t_mknob *x, t_floatarg xpos, t_floatarg ypos,
if (x->x_gui.x_h<0)
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion_fullcircular, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion_fullcircular, 0, 0, xpos, ypos);
else if (x->x_gui.x_h==0)
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion_circular, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion_circular, 0, 0, xpos, ypos);
else
glist_grab(x->x_gui.x_glist, &x->x_gui.x_obj.te_g,
(t_glistmotionfn)mknob_motion, 0, xpos, ypos);
(t_glistmotionfn)mknob_motion, 0, 0, xpos, ypos);
}
static int mknob_newclick(t_gobj *z, struct _glist *glist,
......
......@@ -1481,7 +1481,7 @@ static int pdp_colorgrid_click(t_gobj *z, struct _glist *glist,
pdp_colorgrid_output_current(x);
pdp_colorgrid_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)pdp_colorgrid_motion,
0, xpix, ypix);
0, 0, xpix, ypix);
}
return (1);
}
......
......@@ -518,7 +518,7 @@ static int breakpoints_newclick(t_breakpoints *x, struct _glist *glist,
breakpoints_next_doodle(x,glist,xpos,ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) breakpoints_motion,
(t_glistkeyfn) breakpoints_key, xpos, ypos);
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos);
x->w.shift = shift;
breakpoints_followpointer(x,glist);
......@@ -544,7 +544,7 @@ static int breakpoints_newclick(t_breakpoints *x, struct _glist *glist,
breakpoints_next_doodle(x,glist,xpos,ypos);
glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) breakpoints_motion,
(t_glistkeyfn) breakpoints_key, xpos, ypos);
(t_glistkeyfn) breakpoints_key, 0, xpos, ypos);
x->resizing = 0;
if (x->resizeable && (xpos > wxpos + x->w.width) &&
......
......@@ -670,7 +670,7 @@ static int audience_click(t_gobj *z, struct _glist *glist,
}
audience_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)audience_motion,
0, xpix, ypix);
0, 0, xpix, ypix);
}
return (1);
}
......
......@@ -880,7 +880,7 @@ static int cooled_click(t_gobj *z, struct _glist *glist,
x->x_alted = alt;
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)cooled_motion,
0, xpix, ypix );
0, 0, xpix, ypix );
// draw insertion line
if ( glist_isvisible( x->x_glist ) )
......
......@@ -510,7 +510,7 @@ static int grid_click(t_gobj *z, struct _glist *glist,
grid_output_current(x);
grid_draw_update(x, glist);
glist_grab(glist, &x->x_obj.te_g, (t_glistmotionfn)grid_motion,
0, xpix, ypix);
0, 0, xpix, ypix);
}
return (1);
}
......
......@@ -640,7 +640,7 @@ static int playlist_click(t_gobj *z, struct _glist *glist,
}
x->x_glist = glist;
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)playlist_motion,
NULL, xpix, ypix );
NULL, NULL, xpix, ypix );
}
return (1);
}
......
......@@ -417,7 +417,7 @@ static int scratcher_click(t_gobj *z, struct _glist *glist,
{
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)scratcher_motion,
0, xpix, ypix );
0, 0, xpix, ypix );
x->x_readspeed=0.;
x->x_motioned = 1;
if ( x->x_showspeed )
......
......@@ -426,7 +426,7 @@ static int scrolllist_click(t_gobj *z, struct _glist *glist,
}
x->x_glist = glist;
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)scrolllist_motion,
NULL, xpix, ypix );
NULL, NULL, xpix, ypix );
}
return (1);
}
......
......@@ -1116,7 +1116,7 @@ static int sonogram_click(t_gobj *z, struct _glist *glist,
x->x_alted = alt;
// activate motion callback
glist_grab( glist, &x->x_obj.te_g, (t_glistmotionfn)sonogram_motion,
0, xpix, ypix );
0, 0, xpix, ypix );
if ( shift && alt && (x->x_xstartcapture != x->x_xendcapture ) )
{
......
......@@ -1265,7 +1265,7 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
array_motion_ycumulative = 0;
}
//fprintf(stderr," glist_grab %d %d\n", xpix, ypix);
glist_grab(glist, 0, array_motion, 0, xpix, ypix);
glist_grab(glist, 0, array_motion, 0, 0, xpix, ypix);
}
if (alt)
{
......
......@@ -60,6 +60,8 @@ typedef struct _updateheader
/* types to support glists grabbing mouse motion or keys from parent */
typedef void (*t_glistmotionfn)(void *z, t_floatarg dx, t_floatarg dy);
typedef void (*t_glistkeyfn)(void *z, t_floatarg key);
typedef void (*t_glistkeynamefn)(void *z, t_symbol *s, int argc, t_atom *argv);
typedef void (*t_glistkeynameafn)(void *z, t_symbol *s, int argc, t_atom *argv);
EXTERN_STRUCT _rtext;
#define t_rtext struct _rtext
......@@ -108,9 +110,10 @@ typedef struct _editor
t_rtext *e_rtext; /* text responder linked list */
t_selection *e_selection; /* head of the selection list */
t_rtext *e_textedfor; /* the rtext if any that we are editing */
t_gobj *e_grab; /* object being "dragged" */
t_gobj *e_grab; /* object being dragged/focused */
t_glistmotionfn e_motionfn; /* ... motion callback */
t_glistkeyfn e_keyfn; /* ... keypress callback */
t_glistkeynameafn e_keynameafn; /* ... keyname with autorepeat press callback */
t_binbuf *e_connectbuf; /* connections to deleted objects */
t_binbuf *e_deleted; /* last stuff we deleted */
t_guiconnect *e_guiconnect; /* GUI connection for filtering messages */
......@@ -460,7 +463,8 @@ EXTERN void glist_selectall(t_glist *x);
EXTERN void glist_delete(t_glist *x, t_gobj *y);
EXTERN void glist_retext(t_glist *x, t_text *y);
EXTERN void glist_grab(t_glist *x, t_gobj *y, t_glistmotionfn motionfn,
t_glistkeyfn keyfn, int xpos, int ypos);
t_glistkeyfn keyfn, t_glistkeynameafn keynameafn,
int xpos, int ypos);
EXTERN int glist_isvisible(t_glist *x);
EXTERN int glist_istoplevel(t_glist *x);
EXTERN t_glist *glist_findgraph(t_glist *x);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment