Commit 5ad98e3b authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

port 9ab1b10476bca7e3998d5bf907296979dfc6e558 from Pd-l2ork: fixed regression...

port 9ab1b10476bca7e3998d5bf907296979dfc6e558 from Pd-l2ork: fixed regression where canvaslist was not properly stored
parent 84086f01
......@@ -45,7 +45,7 @@ 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 */
//t_canvas *canvas_list; /* list of all root canvases */
/* ------------------ forward function declarations --------------- */
static void canvas_start_dsp(void);
......@@ -76,7 +76,7 @@ void canvas_updatewindowlist( void)
return;
gui_start_vmess("gui_set_toplevel_window_list", "s", "dummy");
gui_start_array();
for (x = canvas_list; x; x = x->gl_next)
for (x = pd_this->pd_canvaslist; x; x = x->gl_next)
{
if (!x->gl_owner)
{
......@@ -1673,7 +1673,7 @@ void canvas_redrawallfortemplate(t_template *template, int action)
{
t_canvas *x;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
for (x = pd_this->pd_canvaslist; x; x = x->gl_next)
glist_redrawall(template, x, action);
}
......
......@@ -1388,7 +1388,7 @@ void canvas_reload(t_symbol *name, t_symbol *dir, t_gobj *except)
int dspwas = canvas_suspend_dsp();
glist_amreloadingabstractions = 1;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
for (x = pd_this->pd_canvaslist; x; x = x->gl_next)
glist_doreload(x, name, dir, except);
glist_amreloadingabstractions = 0;
canvas_resume_dsp(dspwas);
......@@ -5352,7 +5352,7 @@ void canvas_menuclose(t_canvas *x, t_floatarg fforce);
void glob_closeall(void*dummy, t_floatarg fforce)
{
t_canvas*x, *y;
for (x = canvas_list; x; )
for (x = pd_this->canvaslist; x; )
{
y=x->gl_next;
canvas_menuclose(x, fforce); /* forced closing of this root canvas */
......@@ -5367,7 +5367,7 @@ void glob_verifyquit(void *dummy, t_floatarg f)
//fprintf(stderr, "glob_verifyquit %f\n", f);
t_glist *g, *g2;
/* find all root canvases */
for (g = canvas_list; g; g = g->gl_next)
for (g = pd_this->canvaslist; g; g = g->gl_next)
if (g2 = glist_finddirty(g))
{
/* first open window */
......@@ -5680,7 +5680,7 @@ void canvas_finderror(void *error_object)
{
t_canvas *x;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
for (x = pd_this->pd_canvaslist; x; x = x->gl_next)
{
if ((void *)x == error_object)
{
......
......@@ -8,6 +8,7 @@
#include <math.h> /* for path bbox calculations */
#include "m_pd.h"
#include "m_imp.h"
#include "s_stuff.h" /* for sys_hostfontsize */
#include "g_canvas.h"
......@@ -502,7 +503,7 @@ void template_conform(t_template *tfrom, t_template *tto)
tfrom->t_sym->s_name);
//for (i = 0; i < nto; i++)
// post("... %d", conformaction[i]);
for (gl = canvas_list; gl; gl = gl->gl_next)
for (gl = pd_this->pd_canvaslist; gl; gl = gl->gl_next)
template_conformglist(tfrom, tto, gl, conformaction);
}
freebytes(conformaction, sizeof(int) * nto);
......@@ -2040,7 +2041,7 @@ void svg_doupdate(t_svg *x, t_canvas *c, t_symbol *s)
void svg_update(t_svg *x, t_symbol *s)
{
t_canvas *c;
for (c = canvas_list; c; c = c->gl_next)
for (c = pd_this->pd_canvaslist; c; c = c->gl_next)
svg_doupdate(x, c, s);
}
......
......@@ -554,10 +554,10 @@ void pdinfo_canvaslist(t_pdinfo *x, t_symbol *s, int argc, t_atom *argv)
int j, i = 0;
t_binbuf *outbuf = binbuf_new();
t_atom at[1];
for (c = canvas_list; c; c = c->gl_next)
for (c = pd_this->pd_canvaslist; c; c = c->gl_next)
i++;
t_gpointer *gp = (t_gpointer *)t_getbytes(i * sizeof(*gp));
for (c = canvas_list, i = 0; c; c = c->gl_next, i++)
for (c = pd_this->pd_canvaslist, i = 0; c; c = c->gl_next, i++)
{
gpointer_init(gp+i);
gpointer_setglist(gp+i, c, 0);
......
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