forked from enlightenment/terminology
fix mouse release on SGR mode. Closes T667
This commit is contained in:
parent
a6d51a8d4d
commit
5c9cfca23c
|
@ -2664,6 +2664,7 @@ _rep_mouse_down(Termio *sd, Evas_Event_Mouse_Down *ev, int cx, int cy)
|
||||||
{
|
{
|
||||||
int meta = evas_key_modifier_is_set(ev->modifiers, "Alt") ? 8 : 0;
|
int meta = evas_key_modifier_is_set(ev->modifiers, "Alt") ? 8 : 0;
|
||||||
|
|
||||||
|
if (btn > 2) btn = 0;
|
||||||
snprintf(buf, sizeof(buf), "%c[<%i;%i;%iM", 0x1b,
|
snprintf(buf, sizeof(buf), "%c[<%i;%i;%iM", 0x1b,
|
||||||
(btn | meta), cx + 1, cy + 1);
|
(btn | meta), cx + 1, cy + 1);
|
||||||
termpty_write(sd->pty, buf, strlen(buf));
|
termpty_write(sd->pty, buf, strlen(buf));
|
||||||
|
@ -2749,8 +2750,10 @@ _rep_mouse_up(Termio *sd, Evas_Event_Mouse_Up *ev, int cx, int cy)
|
||||||
break;
|
break;
|
||||||
case MOUSE_EXT_SGR: // ESC.[.<.NUM.;.NUM.;.NUM.m
|
case MOUSE_EXT_SGR: // ESC.[.<.NUM.;.NUM.;.NUM.m
|
||||||
{
|
{
|
||||||
|
int btn = ev->button - 1;
|
||||||
|
if (btn > 2) btn = 0;
|
||||||
snprintf(buf, sizeof(buf), "%c[<%i;%i;%im", 0x1b,
|
snprintf(buf, sizeof(buf), "%c[<%i;%i;%im", 0x1b,
|
||||||
(3 | meta), cx + 1, cy + 1);
|
(btn | meta), cx + 1, cy + 1);
|
||||||
termpty_write(sd->pty, buf, strlen(buf));
|
termpty_write(sd->pty, buf, strlen(buf));
|
||||||
ret = EINA_TRUE;
|
ret = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue