mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
term: visual_focus_{in,out}: do nothing if already focused/defocused
This commit is contained in:
parent
304355d8ed
commit
80dfd5b645
1 changed files with 6 additions and 0 deletions
|
|
@ -1399,6 +1399,9 @@ term_restore_cursor(struct terminal *term)
|
|||
void
|
||||
term_visual_focus_in(struct terminal *term)
|
||||
{
|
||||
if (term->visual_focus)
|
||||
return;
|
||||
|
||||
term->visual_focus = true;
|
||||
if (term->cursor_blink.active)
|
||||
cursor_blink_start_timer(term);
|
||||
|
|
@ -1408,6 +1411,9 @@ term_visual_focus_in(struct terminal *term)
|
|||
void
|
||||
term_visual_focus_out(struct terminal *term)
|
||||
{
|
||||
if (!term->visual_focus)
|
||||
return;
|
||||
|
||||
term->visual_focus = false;
|
||||
if (term->cursor_blink.active)
|
||||
cursor_blink_stop_timer(term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue