aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
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)
{