From 7f6a4f4b6bc5c66898efe2ccb588d0aa1e74c525 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 16 Jul 2019 10:34:08 +0200 Subject: csi: implement FocusIn/Out events --- terminal.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index b7c7cf69..5e0f625f 100644 --- a/terminal.c +++ b/terminal.c @@ -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) { -- cgit v1.3