From b37a3eefb6f951ddef5f22f74a492555b3198855 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 14 Jan 2019 22:44:31 +0000 Subject: [PATCH] terminology: move log dom registering the log domain should be registered when there is a new window, not when there is a new term. A windows can exist before a term can exist. Further more, win_new function is using this log domain so it should be inited. --- src/bin/win.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bin/win.c b/src/bin/win.c index a53efd07..30b4b59a 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -1628,6 +1628,13 @@ win_new(const char *name, const char *role, const char *title, return NULL; } + if (_win_log_dom < 0) + { + _win_log_dom = eina_log_domain_register("win", NULL); + if (_win_log_dom < 0) + EINA_LOG_CRIT("Could not create logging domain '%s'.", "win"); + } + tc = (Term_Container*) wn; tc->term_next = _win_term_next; tc->term_prev = _win_term_prev; @@ -5598,13 +5605,6 @@ term_new(Win *wn, Config *config, const char *cmd, if (!config) abort(); - /* TODO: clean up that */ - if (_win_log_dom < 0) - { - _win_log_dom = eina_log_domain_register("win", NULL); - if (_win_log_dom < 0) - EINA_LOG_CRIT("Could not create logging domain '%s'.", "win"); - } termpty_init(); miniview_init(); gravatar_init();