diff options
-rw-r--r-- | src/tab.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -422,7 +422,7 @@ title_cb(WebKitWebView __attribute__((unused)) *web_view, } static MqTab * -init_non_root(const gchar *uri) +init_non_root(const gchar *uri, MqTab *source) { MqTab *tab; @@ -433,6 +433,9 @@ init_non_root(const gchar *uri) tab->first_child = tab->last_child = NULL; tab->tree_size = 1; + tab->window = source->window; + tab->application = mq_window_get_application(tab->window); + mq_tab_populate_tab(tab); tab->chrome = mq_tab_chrome_new(tab, uri); @@ -508,10 +511,7 @@ mq_tab_new(const gchar *uri, MqTab *source) { MqTab *tab; - tab = init_non_root(uri); - - tab->window = source->window; - tab->application = mq_window_get_application(tab->window); + tab = init_non_root(uri, source); if (mq_application_marquee_mode_on(tab->application)) { begin_scrolling_tab_label(tab); @@ -532,10 +532,7 @@ mq_tab_new_relative(const gchar *uri, MqTab *source) { MqTab *tab; - tab = init_non_root(uri); - - tab->window = source->window; - tab->application = mq_window_get_application(tab->window); + tab = init_non_root(uri, source); if (mq_application_marquee_mode_on(tab->application)) { begin_scrolling_tab_label(tab); |