summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/themes/default.edc10
-rw-r--r--data/themes/mild.edc6
-rw-r--r--src/bin/config.c6
-rw-r--r--src/bin/config.h1
-rw-r--r--src/bin/options_behavior.c2
-rw-r--r--src/bin/termio.c3
-rw-r--r--src/bin/win.c38
7 files changed, 57 insertions, 9 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 760b968..047bcc8 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -1008,6 +1008,16 @@ collections {
1008 target: "shine"; 1008 target: "shine";
1009 after: "focus_in2"; 1009 after: "focus_in2";
1010 } 1010 }
1011 program {
1012 signal: "focused,set"; source: "terminology";
1013 action: STATE_SET "focused" 0.0;
1014 target: "glint";
1015 target: "shine";
1016 sequence {
1017 action: STATE_SET "focused2" 0.0;
1018 target: "glow";
1019 }
1020 }
1011 program { name: "focus_in2"; 1021 program { name: "focus_in2";
1012 action: STATE_SET "focused2" 0.0; 1022 action: STATE_SET "focused2" 0.0;
1013 transition: DECELERATE 0.5; 1023 transition: DECELERATE 0.5;
diff --git a/data/themes/mild.edc b/data/themes/mild.edc
index 4e006ed..bf3a672 100644
--- a/data/themes/mild.edc
+++ b/data/themes/mild.edc
@@ -87,6 +87,12 @@ collections {
87 target: "focusclip"; 87 target: "focusclip";
88 } 88 }
89 program { 89 program {
90 signal: "focused,set";
91 source: "terminology";
92 action: STATE_SET "default" 0.0;
93 target: "focusclip";
94 }
95 program {
90 signal: "focus,out"; 96 signal: "focus,out";
91 source: "terminology"; 97 source: "terminology";
92 action: STATE_SET "unfocused" 0.0; 98 action: STATE_SET "unfocused" 0.0;
diff --git a/src/bin/config.c b/src/bin/config.c
index 2ead19a..35a6e75 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -152,6 +152,9 @@ config_init(void)
152 (edd_base, Config, "mouse_over_focus", 152 (edd_base, Config, "mouse_over_focus",
153 mouse_over_focus, EET_T_UCHAR); 153 mouse_over_focus, EET_T_UCHAR);
154 EET_DATA_DESCRIPTOR_ADD_BASIC 154 EET_DATA_DESCRIPTOR_ADD_BASIC
155 (edd_base, Config, "disable_focus_visuals",
156 disable_focus_visuals, EET_T_UCHAR);
157 EET_DATA_DESCRIPTOR_ADD_BASIC
155 (edd_base, Config, "colors_use", colors_use, EET_T_UCHAR); 158 (edd_base, Config, "colors_use", colors_use, EET_T_UCHAR);
156 EET_DATA_DESCRIPTOR_ADD_ARRAY 159 EET_DATA_DESCRIPTOR_ADD_ARRAY
157 (edd_base, Config, "colors", colors, edd_color); 160 (edd_base, Config, "colors", colors, edd_color);
@@ -265,6 +268,7 @@ config_sync(const Config *config_src, Config *config)
265 config->colors_use = config_src->colors_use; 268 config->colors_use = config_src->colors_use;
266 memcpy(config->colors, config_src->colors, sizeof(config->colors)); 269 memcpy(config->colors, config_src->colors, sizeof(config->colors));
267 config->mouse_over_focus = config_src->mouse_over_focus; 270 config->mouse_over_focus = config_src->mouse_over_focus;
271 config->disable_focus_visuals = config_src->disable_focus_visuals;
268 /* TODO: config->keys */ 272 /* TODO: config->keys */
269 config->gravatar = config_src->gravatar; 273 config->gravatar = config_src->gravatar;
270 config->notabs = config_src->notabs; 274 config->notabs = config_src->notabs;
@@ -512,6 +516,7 @@ config_new(void)
512 config->drag_links = EINA_FALSE; 516 config->drag_links = EINA_FALSE;
513 config->login_shell = EINA_FALSE; 517 config->login_shell = EINA_FALSE;
514 config->mouse_over_focus = EINA_TRUE; 518 config->mouse_over_focus = EINA_TRUE;
519 config->disable_focus_visuals = EINA_FALSE;
515 config->colors_use = EINA_FALSE; 520 config->colors_use = EINA_FALSE;
516 config->gravatar = EINA_TRUE; 521 config->gravatar = EINA_TRUE;
517 config->notabs = EINA_FALSE; 522 config->notabs = EINA_FALSE;
@@ -701,6 +706,7 @@ config_fork(Config *config)
701 CPY(colors_use); 706 CPY(colors_use);
702 memcpy(config2->colors, config->colors, sizeof(config->colors)); 707 memcpy(config2->colors, config->colors, sizeof(config->colors));
703 CPY(mouse_over_focus); 708 CPY(mouse_over_focus);
709 CPY(disable_focus_visuals);
704 CPY(temporary); 710 CPY(temporary);
705 SCPY(config_key); 711 SCPY(config_key);
706 CPY(font_set); 712 CPY(font_set);
diff --git a/src/bin/config.h b/src/bin/config.h
index db6db6e..2db6b25 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -72,6 +72,7 @@ struct _Config
72 Eina_Bool drag_links; 72 Eina_Bool drag_links;
73 Eina_Bool login_shell; 73 Eina_Bool login_shell;
74 Eina_Bool mouse_over_focus; 74 Eina_Bool mouse_over_focus;
75 Eina_Bool disable_focus_visuals;
75 Eina_Bool colors_use; 76 Eina_Bool colors_use;
76 Eina_Bool gravatar; 77 Eina_Bool gravatar;
77 Eina_Bool notabs; 78 Eina_Bool notabs;
diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c
index a44d3a0..e090485 100644
--- a/src/bin/options_behavior.c
+++ b/src/bin/options_behavior.c
@@ -39,6 +39,7 @@ CB(erase_is_del, 0);
39CB(drag_links, 0); 39CB(drag_links, 0);
40CB(login_shell, 0); 40CB(login_shell, 0);
41CB(mouse_over_focus, 0); 41CB(mouse_over_focus, 0);
42CB(disable_focus_visuals, 0);
42CB(gravatar, 0); 43CB(gravatar, 0);
43CB(notabs, 1); 44CB(notabs, 1);
44CB(mv_always_show, 0); 45CB(mv_always_show, 0);
@@ -199,6 +200,7 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
199 CX(_("Drag & drop links"), drag_links, 0); 200 CX(_("Drag & drop links"), drag_links, 0);
200 CX(_("Start as login shell"), login_shell, 0); 201 CX(_("Start as login shell"), login_shell, 0);
201 CX(_("Focus split under the Mouse"), mouse_over_focus, 0); 202 CX(_("Focus split under the Mouse"), mouse_over_focus, 0);
203 CX(_("Disable focus-out visuals"), disable_focus_visuals, 0);
202 CX(_("Gravatar integration"), gravatar, 0); 204 CX(_("Gravatar integration"), gravatar, 0);
203 CX(_("Show tabs"), notabs, 1); 205 CX(_("Show tabs"), notabs, 1);
204 CX(_("Always show miniview"), mv_always_show, 0); 206 CX(_("Always show miniview"), mv_always_show, 0);
diff --git a/src/bin/termio.c b/src/bin/termio.c
index ff14490..e907498 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3518,7 +3518,8 @@ _smart_cb_focus_out(void *data,
3518 Termio *sd = evas_object_smart_data_get(data); 3518 Termio *sd = evas_object_smart_data_get(data);
3519 EINA_SAFETY_ON_NULL_RETURN(sd); 3519 EINA_SAFETY_ON_NULL_RETURN(sd);
3520 3520
3521 edje_object_signal_emit(sd->cursor.obj, "focus,out", "terminology"); 3521 if (!sd->config->disable_focus_visuals)
3522 edje_object_signal_emit(sd->cursor.obj, "focus,out", "terminology");
3522 if (!sd->win) return; 3523 if (!sd->win) return;
3523 sd->pty->selection.last_click = 0; 3524 sd->pty->selection.last_click = 0;
3524 elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_OFF); 3525 elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_OFF);
diff --git a/src/bin/win.c b/src/bin/win.c
index f169728..ba5078e 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -370,8 +370,11 @@ _solo_unfocus(Term_Container *tc, Term_Container *relative)
370 if (tc->parent != relative) 370 if (tc->parent != relative)
371 tc->parent->unfocus(tc->parent, tc); 371 tc->parent->unfocus(tc->parent, tc);
372 372
373 edje_object_signal_emit(term->bg, "focus,out", "terminology"); 373 if (!term->config->disable_focus_visuals)
374 edje_object_signal_emit(term->base, "focus,out", "terminology"); 374 {
375 edje_object_signal_emit(term->bg, "focus,out", "terminology");
376 edje_object_signal_emit(term->base, "focus,out", "terminology");
377 }
375 378
376 if (!tc->wn->cmdbox_up) 379 if (!tc->wn->cmdbox_up)
377 elm_object_focus_set(term->termio, EINA_FALSE); 380 elm_object_focus_set(term->termio, EINA_FALSE);
@@ -402,8 +405,16 @@ _solo_focus(Term_Container *tc, Term_Container *relative)
402 tc->parent->focus(tc->parent, tc); 405 tc->parent->focus(tc->parent, tc);
403 406
404 tc->is_focused = EINA_TRUE; 407 tc->is_focused = EINA_TRUE;
405 edje_object_signal_emit(term->bg, "focus,in", "terminology"); 408 if (term->config->disable_focus_visuals)
406 edje_object_signal_emit(term->base, "focus,in", "terminology"); 409 {
410 edje_object_signal_emit(term->bg, "focused,set", "terminology");
411 edje_object_signal_emit(term->base, "focused,set", "terminology");
412 }
413 else
414 {
415 edje_object_signal_emit(term->bg, "focus,in", "terminology");
416 edje_object_signal_emit(term->base, "focus,in", "terminology");
417 }
407 if (term->wn->cmdbox) 418 if (term->wn->cmdbox)
408 elm_object_focus_set(term->wn->cmdbox, EINA_FALSE); 419 elm_object_focus_set(term->wn->cmdbox, EINA_FALSE);
409 elm_object_focus_set(term->termio, EINA_TRUE); 420 elm_object_focus_set(term->termio, EINA_TRUE);
@@ -498,8 +509,11 @@ _cb_win_focus_in(void *data,
498 { 509 {
499 if (term) 510 if (term)
500 { 511 {
501 edje_object_signal_emit(term->bg, "focus,out", "terminology"); 512 if (!term->config->disable_focus_visuals)
502 edje_object_signal_emit(term->base, "focus,out", "terminology"); 513 {
514 edje_object_signal_emit(term->bg, "focus,out", "terminology");
515 edje_object_signal_emit(term->base, "focus,out", "terminology");
516 }
503 if (!wn->cmdbox_up) 517 if (!wn->cmdbox_up)
504 elm_object_focus_set(term->termio, EINA_FALSE); 518 elm_object_focus_set(term->termio, EINA_FALSE);
505 } 519 }
@@ -4094,8 +4108,16 @@ _term_bg_config(Term *term)
4094 DBG("is focused? tc:%p", term->container); 4108 DBG("is focused? tc:%p", term->container);
4095 if (_term_is_focused(term) && (_win_is_focused(term->wn))) 4109 if (_term_is_focused(term) && (_win_is_focused(term->wn)))
4096 { 4110 {
4097 edje_object_signal_emit(term->bg, "focus,in", "terminology"); 4111 if (term->config->disable_focus_visuals)
4098 edje_object_signal_emit(term->base, "focus,in", "terminology"); 4112 {
4113 edje_object_signal_emit(term->bg, "focused,set", "terminology");
4114 edje_object_signal_emit(term->base, "focused,set", "terminology");
4115 }
4116 else
4117 {
4118 edje_object_signal_emit(term->bg, "focus,in", "terminology");
4119 edje_object_signal_emit(term->base, "focus,in", "terminology");
4120 }
4099 if (term->wn->cmdbox) 4121 if (term->wn->cmdbox)
4100 elm_object_focus_set(term->wn->cmdbox, EINA_FALSE); 4122 elm_object_focus_set(term->wn->cmdbox, EINA_FALSE);
4101 elm_object_focus_set(term->termio, EINA_TRUE); 4123 elm_object_focus_set(term->termio, EINA_TRUE);