diff options
author | portix <none@none> | 2012-12-29 13:03:52 +0100 |
---|---|---|
committer | portix <none@none> | 2012-12-29 13:03:52 +0100 |
commit | 6c1d083ff8de9d79c79f1f16e8c2cf951832cda0 (patch) | |
tree | 2dbec3f6f0ecefada4de29af56d74a3014de63a3 /src/dwb.c | |
parent | 60a66c73df1b8df2451587b043535347f72a0123 (diff) | |
download | dwb-6c1d083ff8de9d79c79f1f16e8c2cf951832cda0.zip |
Set event name when focusing a tab, adding eventname in tabFocus-signal
Diffstat (limited to 'src/dwb.c')
-rw-r--r-- | src/dwb.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1598,16 +1598,17 @@ dwb_hide_tabbar(int *running) /* dwb_focus_view(GList *gl){{{*/ gboolean -dwb_focus_view(GList *gl) +dwb_focus_view(GList *gl, const char *event) { static int running; if (gl != dwb.state.fview) { if (EMIT_SCRIPT(TAB_FOCUS)) { + char *json = util_create_json(1, CHAR, "event", event); //ScriptSignal signal = { SCRIPTS_WV(gl), .objects = { SCRIPTS_WV(dwb.state.fview) }, SCRIPTS_SIG_META(NULL, TAB_FOCUS, 1) }; - ScriptSignal signal = { SCRIPTS_WV(gl), .objects = { G_OBJECT(VIEW(dwb.state.fview)->web) }, SCRIPTS_SIG_META(NULL, TAB_FOCUS, 1) }; - SCRIPTS_EMIT_RETURN(signal, NULL, true); + ScriptSignal signal = { SCRIPTS_WV(gl), .objects = { G_OBJECT(VIEW(dwb.state.fview)->web) }, SCRIPTS_SIG_META(json, TAB_FOCUS, 1) }; + SCRIPTS_EMIT_RETURN(signal, json, true); } gtk_widget_show(VIEW(gl)->scroll); dwb_soup_clean(); |