forked from enlightenment/terminology
termiointernals: set mouse position on mouse down/up
This commit is contained in:
parent
8169dcca63
commit
7eaba7447c
|
@ -1602,6 +1602,9 @@ termio_internal_mouse_down(Termio *sd,
|
||||||
|
|
||||||
termio_cursor_to_xy(sd, ev->canvas.x, ev->canvas.y, &cx, &cy);
|
termio_cursor_to_xy(sd, ev->canvas.x, ev->canvas.y, &cx, &cy);
|
||||||
|
|
||||||
|
sd->mouse.cx = cx;
|
||||||
|
sd->mouse.cy = cy;
|
||||||
|
|
||||||
if ((ev->button == 3) && modifiers.ctrl)
|
if ((ev->button == 3) && modifiers.ctrl)
|
||||||
{
|
{
|
||||||
termio_handle_right_click(ev, sd, cx, cy);
|
termio_handle_right_click(ev, sd, cx, cy);
|
||||||
|
@ -1844,6 +1847,9 @@ termio_internal_mouse_up(Termio *sd,
|
||||||
|
|
||||||
termio_cursor_to_xy(sd, ev->canvas.x, ev->canvas.y, &cx, &cy);
|
termio_cursor_to_xy(sd, ev->canvas.x, ev->canvas.y, &cx, &cy);
|
||||||
|
|
||||||
|
sd->mouse.cx = cx;
|
||||||
|
sd->mouse.cy = cy;
|
||||||
|
|
||||||
if (!modifiers.shift && !modifiers.ctrl && !sd->pty->selection.makesel)
|
if (!modifiers.shift && !modifiers.ctrl && !sd->pty->selection.makesel)
|
||||||
if (_rep_mouse_up(sd, ev, cx, cy, modifiers))
|
if (_rep_mouse_up(sd, ev, cx, cy, modifiers))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue