termio: fix mouse button event tracking in vim

Commit 9e0b63403f caused mouse events not
to be processed correctly by vim. Resizing subwindows with the mouse was
fully broken.

Without the mouse button information, the button event tracking could
not be forwarded to the terminal.
This commit is contained in:
Jean Guyomarc'h 2017-06-04 23:56:38 +02:00
parent ede4196eae
commit 97469490fb
1 changed files with 3 additions and 3 deletions

View File

@ -3793,7 +3793,7 @@ _rep_mouse_up(Termio *sd, Evas_Event_Mouse_Up *ev, int cx, int cy)
}
static Eina_Bool
_rep_mouse_move(Termio *sd, int cx, int cy)
_rep_mouse_move(Termio *sd, Evas_Event_Mouse_Move *ev, int cx, int cy)
{
char buf[64];
Eina_Bool ret = EINA_FALSE;
@ -3807,7 +3807,7 @@ _rep_mouse_move(Termio *sd, int cx, int cy)
if ((!sd->mouse.button) && (sd->pty->mouse_mode == MOUSE_NORMAL_BTN_MOVE))
return EINA_FALSE;
btn = - 1;
btn = sd->mouse.button - 1;
switch (sd->pty->mouse_ext)
{
@ -4400,7 +4400,7 @@ _smart_cb_mouse_move(void *data,
sd->mouse.cx = cx;
sd->mouse.cy = cy;
if (!shift && !ctrl)
if (_rep_mouse_move(sd, cx, cy)) return;
if (_rep_mouse_move(sd, ev, cx, cy)) return;
if (sd->link.down.dnd)
{
sd->pty->selection.makesel = EINA_FALSE;