about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2011-10-27 14:47:53 -0500
committerMarco Peereboom <marco@conformal.com>2011-10-27 14:47:53 -0500
commit78554969e08345a065bb36d97ae9ae5e2e1e0ac8 (patch)
tree6aa5f627b13842cda808443be55b7d1ad9497e83
parent0feb9b230dc2cd11095d05f1ea7ca78c6bd83206 (diff)
downloadxombrero-78554969e08345a065bb36d97ae9ae5e2e1e0ac8.tar.gz
make sure we initialize the script
-rw-r--r--xxxterm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index f303535..82955ae 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -245,6 +245,7 @@ struct tab {
 	GThread			*thread;
 #endif
 	/* hints */
+	int			script_init;
 	int			hints_on;
 	int			new_tab;
 
@@ -2411,6 +2412,12 @@ run_script(struct tab *t, char *s)
 	DNPRINTF(XT_D_JS, "run_script: tab %d %s\n",
 	    t->tab_id, s == (char *)JS_HINTING ? "JS_HINTING" : s);
 
+	/* a bit silly but it prevents some heartburn */
+	if (t->script_init == 0) {
+		t->script_init = 1;
+		run_script(t, JS_HINTING);
+	}
+
 	frame = webkit_web_view_get_main_frame(t->wv);
 	ctx = webkit_web_frame_get_global_context(frame);