diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 7c652dbf51f1a56e1a09556fbbcc55f0ce3bd2e7..81416cf1ea96dda7cb679da92c2a7386118b01a0 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2344,10 +2344,10 @@ function gui_toggle_update(cid, tag, state, color) { } // Todo: send fewer parameters from c -function gui_create_numbox(width,cid,tag,bgcolor,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,basex,basey,half) { -gui_post("numbox width is " + width); +function gui_create_numbox(width,cid,tag,bgcolor,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,basex,basey,half, is_toplevel) { +gui_post("basex is " + basex + " and basey is " + basey); // numbox doesn't have a standard iemgui border, so we must create its gobj manually - var g = gui_text_create_gobj(cid, tag, basex, basey) + var g = gui_text_create_gobj(cid, tag, "iemgui", basex, basey, is_toplevel) var data_array = ['M', p1 - basex, p2 - basey, 'L', p3 - basex, p4 - basey, p5 - basex, p6 - basey, diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 6d9d8b771b07cac3c7481a708db83364c3b993c2..8f2571fa337eb8e287c2b7718327baca9e041650 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -176,9 +176,10 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist) // canvas, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, // x->x_hide_frame <= 1 ? "$pd_colors(iemgui_border)" : bcol, // bcol, x, x); - gui_vmess("gui_create_numbox", "isssiiiiiiiiiiiii", x->x_numwidth, + gui_vmess("gui_create_numbox", "isssiiiiiiiiiiiiii", x->x_numwidth, canvas_tag(canvas), gobj_tag(x), - bcol, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, half); + bcol, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, half, + glist_istoplevel(canvas)); /* Not sure when it is necessary to hide the frame... */ if (!x->x_hide_frame || x->x_hide_frame == 2) sys_vgui(".x%lx.c create polyline %d %d %d %d %d %d -stroke #%6.6x "