aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-08-03 21:45:05 +0200
committerBoris Faure <billiob@gmail.com>2015-08-03 21:45:05 +0200
commit423d06fed38cdbfb10b5a45fe048bae0217ad1ec (patch)
tree21e70d9c0a2f2110f1e7e5b9334e36de96ce9f6e /src/bin/win.c
parentremove wrong assert when no backlog ever generated (diff)
downloadterminology-423d06fed38cdbfb10b5a45fe048bae0217ad1ec.tar.gz
allow different backgrounds via tybg. Closes https://phab.enlightenment.org/T2444
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index aad277d..0225953 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2651,6 +2651,18 @@ _tabs_new(Term_Container *child, Term_Container *parent)
/* }}} */
/* {{{ Term */
+static void
+_term_config_set(Term *term, Config *config)
+{
+ Config *old_config = term->config;
+
+ term->config = config;
+ termio_config_set(term->termio, config);
+ _term_media_update(term, term->config);
+ if (old_config != term->wn->config)
+ config_del(old_config);
+}
+
Eina_Bool
term_has_popmedia(const Term *term)
{
@@ -3218,12 +3230,14 @@ _cb_command(void *data, Evas_Object *obj EINA_UNUSED, void *event)
if (config)
{
- config->temporary = EINA_TRUE;
+ Config *new_config = config_fork(config);
+
+ new_config->temporary = EINA_TRUE;
if (cmd[2])
- eina_stringshare_replace(&(config->background), cmd + 2);
+ eina_stringshare_replace(&(new_config->background), cmd + 2);
else
- eina_stringshare_replace(&(config->background), NULL);
- main_media_update(config);
+ eina_stringshare_replace(&(new_config->background), NULL);
+ _term_config_set(term, new_config);
}
}
else if (cmd[1] == 'p') // permanent