Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
eea40f66
Commit
eea40f66
authored
Jul 23, 2016
by
Jonathan Wilkes
Browse files
use glist_isvisible to protect against sending messages to GUI before the relevant canvas exists
parent
777121c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/src/g_canvas.c
View file @
eea40f66
...
...
@@ -690,7 +690,7 @@ void canvas_dirty(t_canvas *x, t_floatarg n)
if
((
unsigned
)
n
!=
x2
->
gl_dirty
)
{
x2
->
gl_dirty
=
n
;
if
(
x2
->
gl_havewindow
)
// was
glist_isvisible(x2)
if
(
x2
->
gl_havewindow
&&
glist_isvisible
(
x2
)
)
canvas_reflecttitle
(
x2
);
}
}
...
...
pd/src/g_editor.c
View file @
eea40f66
...
...
@@ -7230,7 +7230,8 @@ void canvas_editmode(t_canvas *x, t_floatarg fyesplease)
//dpsaha@vt.edu called to delete the GOP_blob
if
(
x
->
gl_goprect
)
canvas_draw_gop_resize_hooks
(
x
);
}
canvas_setcursor
(
x
,
CURSOR_RUNMODE_NOTHING
);
if
(
glist_isvisible
(
x
))
canvas_setcursor
(
x
,
CURSOR_RUNMODE_NOTHING
);
}
if
(
glist_isvisible
(
x
))
{
...
...
pd/src/g_graph.c
View file @
eea40f66
...
...
@@ -1426,7 +1426,9 @@ static void graph_select(t_gobj *z, t_glist *glist, int state)
{
canvas
=
glist
;
}
if
(
glist_istoplevel
(
glist
))
if
(
glist_isvisible
(
glist
)
&&
(
glist_istoplevel
(
glist
)
||
gobj_shouldvis
(
x
,
glist
)))
{
if
(
state
)
gui_vmess
(
"gui_gobj_select"
,
"xs"
,
...
...
pd/src/g_scalar.c
View file @
eea40f66
...
...
@@ -606,14 +606,16 @@ void scalar_select(t_gobj *z, t_glist *owner, int state)
if
(
state
)
{
x
->
sc_selected
=
owner
;
gui_vmess
(
"gui_gobj_select"
,
"xs"
,
glist_getcanvas
(
owner
),
tagbuf
);
if
(
glist_isvisible
(
owner
))
gui_vmess
(
"gui_gobj_select"
,
"xs"
,
glist_getcanvas
(
owner
),
tagbuf
);
}
else
{
x
->
sc_selected
=
0
;
gui_vmess
(
"gui_gobj_deselect"
,
"xs"
,
glist_getcanvas
(
owner
),
tagbuf
);
if
(
glist_isvisible
(
owner
))
gui_vmess
(
"gui_gobj_deselect"
,
"xs"
,
glist_getcanvas
(
owner
),
tagbuf
);
}
//sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n",
// glist_getcanvas(owner), owner, state);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment