csi: implement FocusIn/Out events

This commit is contained in:
Daniel Eklöf 2019-07-16 10:34:08 +02:00
parent 9929e902a6
commit 7f6a4f4b6b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 29 additions and 0 deletions

View file

@ -267,6 +267,22 @@ term_reverse_index(struct terminal *term)
term_cursor_up(term, 1);
}
void
term_focus_in(struct terminal *term)
{
if (!term->focus_events)
return;
vt_to_slave(term, "\033[I", 3);
}
void
term_focus_out(struct terminal *term)
{
if (!term->focus_events)
return;
vt_to_slave(term, "\033[O", 3);
}
static int
linux_mouse_button_to_x(int button)
{