From 095e1b410a31166d1f37e8a6ff99e7bb666737ad Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Thu, 30 Dec 2010 22:27:38 +0000 Subject: Sync OpenBSD patchset 812: Support all four of the xterm mouse modes. Based on a diff from hsim at gmx.li. --- input.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index befea30b..55e0e4f7 100644 --- a/input.c +++ b/input.c @@ -1,4 +1,4 @@ -/* $Id: input.c,v 1.111 2010-12-25 23:43:53 tcunha Exp $ */ +/* $Id: input.c,v 1.112 2010-12-30 22:27:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -953,7 +953,7 @@ input_esc_dispatch(struct input_ctx *ictx) screen_write_insertmode(sctx, 0); screen_write_kcursormode(sctx, 0); screen_write_kkeypadmode(sctx, 0); - screen_write_mousemode(sctx, 0); + screen_write_mousemode_off(sctx); screen_write_clearscreen(sctx); screen_write_cursormove(sctx, 0, 0); @@ -1156,7 +1156,10 @@ input_csi_dispatch(struct input_ctx *ictx) screen_write_cursormode(&ictx->ctx, 0); break; case 1000: - screen_write_mousemode(&ictx->ctx, 0); + case 1001: + case 1002: + case 1003: + screen_write_mousemode_off(&ictx->ctx); break; case 1049: window_pane_alternate_off(wp, &ictx->cell); @@ -1192,7 +1195,19 @@ input_csi_dispatch(struct input_ctx *ictx) screen_write_cursormode(&ictx->ctx, 1); break; case 1000: - screen_write_mousemode(&ictx->ctx, 1); + screen_write_mousemode_on( + &ictx->ctx, MODE_MOUSE_STANDARD); + break; + case 1001: + screen_write_mousemode_on( + &ictx->ctx, MODE_MOUSE_HIGHLIGHT); + break; + case 1002: + screen_write_mousemode_on( + &ictx->ctx, MODE_MOUSE_BUTTON); + break; + case 1003: + screen_write_mousemode_on(&ictx->ctx, MODE_MOUSE_ANY); break; case 1049: window_pane_alternate_on(wp, &ictx->cell); -- cgit