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

8
csi.c
View file

@ -672,6 +672,10 @@ csi_dispatch(struct terminal *term, uint8_t final)
term->mouse_tracking = MOUSE_MOTION;
break;
case 1004:
term->focus_events = true;
break;
case 1005:
LOG_WARN("unimplemented: UTF-8 mouse");
/* term->mouse_reporting = MOUSE_UTF8; */
@ -751,6 +755,10 @@ csi_dispatch(struct terminal *term, uint8_t final)
term->mouse_tracking = MOUSE_NONE;
break;
case 1004:
term->focus_events = false;
break;
case 1049:
if (term->grid == &term->alt) {
term->grid = &term->normal;