mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
focus in/out: terminal checks whether it is a state change or not
This commit is contained in:
parent
a6da07b3dd
commit
6bbd4a5110
2 changed files with 7 additions and 19 deletions
|
|
@ -1964,7 +1964,8 @@ term_has_kbd_focus(struct terminal *term)
|
|||
void
|
||||
term_kbd_focus_in(struct terminal *term)
|
||||
{
|
||||
assert(term_has_kbd_focus(term));
|
||||
if (term_has_kbd_focus(term))
|
||||
return;
|
||||
|
||||
if (term->focus_events)
|
||||
term_to_slave(term, "\033[I", 3);
|
||||
|
|
@ -1973,7 +1974,8 @@ term_kbd_focus_in(struct terminal *term)
|
|||
void
|
||||
term_kbd_focus_out(struct terminal *term)
|
||||
{
|
||||
assert(!term_has_kbd_focus(term));
|
||||
if (term_has_kbd_focus(term))
|
||||
return;
|
||||
|
||||
if (term->focus_events)
|
||||
term_to_slave(term, "\033[O", 3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue