aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-16 08:34:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-16 08:34:08 +0000
commit7f6a4f4b6bc5c66898efe2ccb588d0aa1e74c525 (patch)
tree761b0fd9a099109594df18ef56220a7ef33ecc8e /terminal.c
parentcsi: recognize, but mostly ignore, cursor style configuration (diff)
csi: implement FocusIn/Out events
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c16
1 files changed, 16 insertions, 0 deletions
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)
{