summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dwb.c13
-rw-r--r--src/dwb.h1
-rw-r--r--src/util.c2
-rw-r--r--src/util.h2
4 files changed, 12 insertions, 6 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 84edbe04..2a85c48a 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -1183,10 +1183,8 @@ dwb_spawn(GList *gl, const char *prop, const char *uri) {
}
}/*}}}*/
-/* dwb_reload_layout(GList *, WebSettings *s) {{{*/
-static void
-dwb_reload_layout(GList *gl, WebSettings *s) {
- dwb_init_style();
+void
+dwb_update_tabs() {
for (GList *l = dwb.state.views; l; l=l->next) {
if (l == dwb.state.fview) {
view_set_active_style(l);
@@ -1195,7 +1193,13 @@ dwb_reload_layout(GList *gl, WebSettings *s) {
view_set_normal_style(l);
}
}
+}
+
+/* dwb_reload_layout(GList *, WebSettings *s) {{{*/
+static void
+dwb_reload_layout(GList *gl, WebSettings *s) {
dwb_init_style();
+ dwb_update_tabs();
dwb_apply_style();
}/*}}}*/
@@ -1695,6 +1699,7 @@ dwb_update_layout() {
const char *title = webkit_web_view_get_title(WEBKIT_WEB_VIEW(v->web));
dwb_tab_label_set_text(gl, title);
}
+ dwb_update_tabs();
}/*}}}*/
/* dwb_focus(GList *gl) {{{*/
diff --git a/src/dwb.h b/src/dwb.h
index 05eba5c0..7e3efe82 100644
--- a/src/dwb.h
+++ b/src/dwb.h
@@ -834,6 +834,7 @@ void dwb_follow_selection(void);
void dwb_update_layout(void);
const char * dwb_parse_nummod(const char *);
void dwb_init_custom_keys(gboolean);
+void dwb_update_tabs(void);
#endif
diff --git a/src/util.c b/src/util.c
index 16895ba4..bbbd3a5f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -672,7 +672,7 @@ gtk_box_insert(GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, gi
gtk_box_pack_start(box, child, expand, fill, padding);
gtk_box_reorder_child(box, child, position);
}
-GtkWidget *
+void
gtk_widget_remove_from_parent(GtkWidget *widget) {
g_object_ref(widget);
GtkWidget *parent = gtk_widget_get_parent(widget);
diff --git a/src/util.h b/src/util.h
index b2f40749..264d53b5 100644
--- a/src/util.h
+++ b/src/util.h
@@ -88,7 +88,7 @@ gboolean util_file_add(const char *filename, const char *text, int, int);
gboolean util_file_add_navigation(const char *, const Navigation *, int, int);
void gtk_box_insert(GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, gint padding, int position);
-GtkWidget * gtk_widget_remove_from_parent(GtkWidget *);
+void gtk_widget_remove_from_parent(GtkWidget *);
char * util_strcasestr(const char *haystack, const char *needle);
int util_file_remove_line(const char *, const char *);