diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-06 04:33:44 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-06 04:33:44 (EDT) |
commit | 820ee257e367af9e804a5ac19075023cebe56039 (patch) | |
tree | 995899e318dfefcd2e00e454e25bdf91bac00c50 | |
parent | f26adfc58f61f4f6424b2ff2dc845876255adb56 (diff) | |
download | marquee-820ee257e367af9e804a5ac19075023cebe56039.zip marquee-820ee257e367af9e804a5ac19075023cebe56039.tar.gz marquee-820ee257e367af9e804a5ac19075023cebe56039.tar.bz2 |
MqTab: Copy window and application before children init
-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); |