diff --git a/src/g_canvas.c b/src/g_canvas.c index 872c2653c1b735d546050365e2e7cc848d49cc95..8266279a037c417bf6bc31a132d15cb26b912909 100644 --- a/src/g_canvas.c +++ b/src/g_canvas.c @@ -1044,18 +1044,21 @@ void canvas_loadbang(t_canvas *x) canvas_loadbangsubpatches(x); } - /* When you ask a canvas its size the result is 2 pixels more than what - you gave it to open it; perhaps there's a 1-pixel border all around it - or something. Anyway, we just add the 2 pixels back here; seems we - have to do this for linux but not MSW; not sure about MacOS. */ + /* When you ask a canvas its size the result is more than what + you gave it to open it; how much bigger apparently depends on the OS. */ #ifdef __unix__ #define HORIZBORDER 2 #define VERTBORDER 2 #else +#ifdef MACOSX +#define HORIZBORDER 6 +#define VERTBORDER 6 +#else #define HORIZBORDER 4 #define VERTBORDER 4 #endif +#endif static void canvas_relocate(t_canvas *x, t_symbol *canvasgeom, t_symbol *topgeom) diff --git a/src/g_editor.c b/src/g_editor.c index aa8b35c0fdcbd4e4464ac9c953d8bb17532037e7..819785fcee73ebc2b7fee4caca6c35495afc36ee 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -792,6 +792,17 @@ static t_gobj *canvas_findhitbox(t_canvas *x, int xpos, int ypos, if (canvas_hitbox(x, y, xpos, ypos, &x1, &y1, &x2, &y2) && (x1 > *x1p)) *x1p = x1, *y1p = y1, *x2p = x2, *y2p = y2, rval = y; + } + /* if there are at least two selected objects, we'd prefer + to find a selected one (never mind which) to the one we got. */ + if (x->gl_editor && x->gl_editor->e_selection && + x->gl_editor->e_selection->sel_next && !glist_isselected(x, y)) + { + t_selection *sel; + for (sel = x->gl_editor->e_selection; sel; sel = sel->sel_next) + if (canvas_hitbox(x, sel->sel_what, xpos, ypos, &x1, &y1, &x2, &y2)) + *x1p = x1, *y1p = y1, *x2p = x2, *y2p = y2, + rval = sel->sel_what; } return (rval); } diff --git a/src/m_glob.c b/src/m_glob.c index aca3bf2440b4706c55f0906df77b9d5589eb9f24..c3a70e53e6c4a25666edb7c5508f6f5ecc53b010 100644 --- a/src/m_glob.c +++ b/src/m_glob.c @@ -49,6 +49,12 @@ void glob_foo(void *dummy, t_symbol *s, int argc, t_atom *argv) } #endif +static void glob_version(t_pd *dummy, float f) +{ + if (f > 0) + error("file format newer than this version of Pd (trying anyway...)"); +} + void max_default(t_pd *x, t_symbol *s, int argc, t_atom *argv) { int i; @@ -113,6 +119,8 @@ void glob_init(void) class_addmethod(glob_pdobject, (t_method)glob_ping, gensym("ping"), 0); class_addmethod(glob_pdobject, (t_method)glob_savepreferences, gensym("save-preferences"), 0); + class_addmethod(glob_pdobject, (t_method)glob_version, + gensym("version"), A_FLOAT, 0); #ifdef UNIX class_addmethod(glob_pdobject, (t_method)glob_watchdog, gensym("watchdog"), 0); diff --git a/src/notes.txt b/src/notes.txt index 472487c20a16bb384c6507f9b6da31ab440c6cbc..b00b03daac9a7ddb27f637f022ddbdfdfa1ad520 100644 --- a/src/notes.txt +++ b/src/notes.txt @@ -2,6 +2,9 @@ fixed crash bug closing patches with open GOPs fixed PC device counting problem (first device invoked by -audiodev 0) fixed MSTACKSIZE limitation in m_binbuf.c +fixed so that if more than one object is selected, clicking prefers to + "hit" a selected one (better dragging after "duplicate") + test: compile on various versions of linux @@ -53,7 +56,6 @@ real-time spectrum grapher document ||, |, etc, better features: -clicking to prefer selected object if nselect > 1 flag to prevent unlocking patches clickless connection (hit 'c' key? see Bouchard paper) messages to suppress menus&accelerators, and invisibilize Pd window