summaryrefslogtreecommitdiff
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
parent21764bbf85eabe9aab7cb815bc4a49d5f198954f (diff)
allow different backgrounds via tybg. Closes T2444
-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)
2651/* }}} */ 2651/* }}} */
2652/* {{{ Term */ 2652/* {{{ Term */
2653 2653
2654static void
2655_term_config_set(Term *term, Config *config)
2656{
2657 Config *old_config = term->config;
2658
2659 term->config = config;
2660 termio_config_set(term->termio, config);
2661 _term_media_update(term, term->config);
2662 if (old_config != term->wn->config)
2663 config_del(old_config);
2664}
2665
2654Eina_Bool 2666Eina_Bool
2655term_has_popmedia(const Term *term) 2667term_has_popmedia(const Term *term)
2656{ 2668{
@@ -3218,12 +3230,14 @@ _cb_command(void *data, Evas_Object *obj EINA_UNUSED, void *event)
3218 3230
3219 if (config) 3231 if (config)
3220 { 3232 {
3221 config->temporary = EINA_TRUE; 3233 Config *new_config = config_fork(config);
3234
3235 new_config->temporary = EINA_TRUE;
3222 if (cmd[2]) 3236 if (cmd[2])
3223 eina_stringshare_replace(&(config->background), cmd + 2); 3237 eina_stringshare_replace(&(new_config->background), cmd + 2);
3224 else 3238 else
3225 eina_stringshare_replace(&(config->background), NULL); 3239 eina_stringshare_replace(&(new_config->background), NULL);
3226 main_media_update(config); 3240 _term_config_set(term, new_config);
3227 } 3241 }
3228 } 3242 }
3229 else if (cmd[1] == 'p') // permanent 3243 else if (cmd[1] == 'p') // permanent