From 1d2e905763d2c403e54850d61044065b238e16bc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 26 Apr 2016 22:34:25 +0200 Subject: Copy slide --- src/sc_interp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/sc_interp.c') diff --git a/src/sc_interp.c b/src/sc_interp.c index 993cb9e..9c4045b 100644 --- a/src/sc_interp.c +++ b/src/sc_interp.c @@ -212,11 +212,15 @@ static void do_callback(SCInterpreter *scin, SCBlock *bl, const char *name) double w, h; int r; void *bvp; + SCBlock *mr; + + mr = sc_interp_get_macro_real_block(scin); + if ( mr == NULL ) mr = bl; if ( strcmp(cbl->names[i], name) != 0 ) continue; r = cbl->box_funcs[i](scin, bl, &w, &h, &bvp, cbl->vps[i]); if ( !r ) return; - add_callback_para(sc_interp_get_frame(scin), bl, w, h, + add_callback_para(sc_interp_get_frame(scin), bl, mr, w, h, cbl->draw_funcs[i], cbl->click_funcs[i], bvp, cbl->vps[i]); @@ -562,6 +566,7 @@ SCInterpreter *sc_interp_new(PangoContext *pc, PangoLanguage *lang, return NULL; } st->macro_contents = NULL; + st->macro_real_block = NULL; st->fr = NULL; scin->lang = lang; -- cgit v1.2.3