Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22408
Modified Files: Tag: devel_0_39 desire.c Log Message: big bugfix. sorta works now.
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.46 retrieving revision 1.1.2.47 diff -C2 -d -r1.1.2.46 -r1.1.2.47 *** desire.c 31 Oct 2005 11:13:58 -0000 1.1.2.46 --- desire.c 31 Oct 2005 11:36:49 -0000 1.1.2.47 *************** *** 48,51 **** --- 48,52 ---- self->nobs = 0; self->obs = 0; + self->dirtyc = 0; return self; } *************** *** 152,155 **** --- 153,157 ---- void manager_call (void *foo) { t_manager *self = (t_manager *)foo; + if (self->q->len) post("manager_call: %d notices",self->q->len); while (!queue_empty(self->q)) { t_gobj *o = (t_gobj *)queue_get(self->q); *************** *** 170,174 **** a->dirtyc = 1; } else { ! post("double dirty"); } SETFLOAT(a->dirtyv,-1); /* in the future this may contain real data instead */ --- 172,176 ---- a->dirtyc = 1; } else { ! post("double dirty: a->dirtyc=%d",a->dirtyc); } SETFLOAT(a->dirtyv,-1); /* in the future this may contain real data instead */ *************** *** 736,742 ****
void canvas_redraw(t_canvas *x) { - if (!glist_isvisible(x)) return; - t_gobj *y; - // glist_each(y,x) {} if (glist_isvisible(x)) {canvas_map(x,0); canvas_map(x, 1);} } --- 738,741 ---- *************** *** 805,815 **** in front of all windows; or with "f" zero, when we want to get rid of the window. */ ! void canvas_vis(t_canvas *x, t_floatarg f) ! { ! if (!!f) ! { ! /* test if we're already visible and toplevel */ ! if (x->gl_editor) ! { /* just put us in front */ #ifdef MSW canvas_vis(x, 0); --- 804,810 ---- in front of all windows; or with "f" zero, when we want to get rid of the window. */ ! void canvas_vis(t_canvas *x, t_floatarg f) { ! if (!!f) { ! if (x->gl_editor) { /* already visible, so just raise window */ #ifdef MSW canvas_vis(x, 0); *************** *** 820,843 **** sys_mgui(x,"window_deiconify",""); #endif ! } ! else ! { canvas_create_editor(x, 1); - sys_vgui("pdtk_canvas_new .x%lx %d %d +%d+%d %d\n", (long)x, - (int)(x->gl_screenx2 - x->gl_screenx1), - (int)(x->gl_screeny2 - x->gl_screeny1), - (int)(x->gl_screenx1), (int)(x->gl_screeny1), - x->gl_edit); canvas_reflecttitle(x); x->gl_havewindow = 1; canvas_updatewindowlist(); } ! } ! else /* make invisible */ ! { int i; t_canvas *x2; ! if (!x->gl_havewindow) ! { /* bug workaround -- a graph in a visible patch gets "invised" when the patch is closed, and must lose the editor here. It's --- 815,833 ---- sys_mgui(x,"window_deiconify",""); #endif ! } else { canvas_create_editor(x, 1); canvas_reflecttitle(x); x->gl_havewindow = 1; canvas_updatewindowlist(); + post("subscribe %lx",(long)x); + gobj_subscribe((t_gobj *)x,(t_gobj *)manager); + gobj_changed(x,""); } ! } else { /* make invisible */ int i; t_canvas *x2; ! post("subscribe %lx",(long)x); ! gobj_subscribe((t_gobj *)x,(t_gobj *)manager); ! if (!x->gl_havewindow) { /* bug workaround -- a graph in a visible patch gets "invised" when the patch is closed, and must lose the editor here. It's *************** *** 845,874 **** subpatches fall here too but don'd need the editor freed, so we check if it exists. */ ! if (x->gl_editor) ! canvas_create_editor(x, 0); return; } sys_mgui(x,"getscroll",""); glist_noselect(x); ! if (glist_isvisible(x)) ! canvas_map(x, 0); canvas_create_editor(x, 0); sys_vgui("destroy .x%lx\n", (long)x); // huh? ! for (i = 1, x2 = x; x2; x2 = x2->gl_next, i++) ! ; ! sys_vgui(".mbar.find delete %d\n", i); ! /* if we're a graph on our parent, and if the parent exists ! and is visible, show ourselves on parent. */ ! if (glist_isgraph(x) && x->gl_owner) ! { t_glist *gl2 = x->gl_owner; canvas_create_editor(x, 1); ! if (glist_isvisible(gl2)) ! gobj_vis(&x->gl_gobj, gl2, 0); x->gl_havewindow = 0; ! if (glist_isvisible(gl2)) ! gobj_vis(&x->gl_gobj, gl2, 1); ! } ! else x->gl_havewindow = 0; canvas_updatewindowlist(); } --- 835,857 ---- subpatches fall here too but don'd need the editor freed, so we check if it exists. */ ! if (x->gl_editor) canvas_create_editor(x, 0); return; } sys_mgui(x,"getscroll",""); glist_noselect(x); ! if (glist_isvisible(x)) canvas_map(x, 0); canvas_create_editor(x, 0); sys_vgui("destroy .x%lx\n", (long)x); // huh? ! i=1; for (x2=x; x2; x2=x2->gl_next) i++; ! sys_vgui(".mbar.find delete %d\n", i); // huh??? ! /* if we're a graph on our parent, and if the parent exists ! and is visible, show ourselves on parent. */ ! if (glist_isgraph(x) && x->gl_owner) { t_glist *gl2 = x->gl_owner; canvas_create_editor(x, 1); ! if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 0); x->gl_havewindow = 0; ! if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 1); ! } else x->gl_havewindow = 0; canvas_updatewindowlist(); } *************** *** 877,881 **** /* we call this on a non-toplevel glist to "open" it into its own window. */ ! void glist_menu_open(t_glist *x) { if (glist_isvisible(x) && !glist_istoplevel(x)) --- 860,864 ---- /* we call this on a non-toplevel glist to "open" it into its own window. */ ! static void glist_menu_open(t_glist *x) { if (glist_isvisible(x) && !glist_istoplevel(x))