summaryrefslogtreecommitdiff
path: root/src/dwb.c
diff options
context:
space:
mode:
authorportix <none@none>2012-12-29 13:03:52 +0100
committerportix <none@none>2012-12-29 13:03:52 +0100
commit6c1d083ff8de9d79c79f1f16e8c2cf951832cda0 (patch)
tree2dbec3f6f0ecefada4de29af56d74a3014de63a3 /src/dwb.c
parent60a66c73df1b8df2451587b043535347f72a0123 (diff)
downloaddwb-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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 2d2dce74..d1de4d11 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -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();