mirror of
https://github.com/tmux/tmux.git
synced 2026-04-16 03:56:28 +00:00
Fixed missing drag end detection and mouse button detection with
modifiers. From Dane Jensen, reported by Joseph Tyson and Mark Kelly.
This commit is contained in:
@@ -926,6 +926,7 @@ have_event:
|
|||||||
* End a mouse drag by passing a MouseDragEnd key corresponding
|
* End a mouse drag by passing a MouseDragEnd key corresponding
|
||||||
* to the button that started the drag.
|
* to the button that started the drag.
|
||||||
*/
|
*/
|
||||||
|
type = KEYC_TYPE_MOUSEDRAGEND;
|
||||||
c->tty.mouse_drag_flag = 0;
|
c->tty.mouse_drag_flag = 0;
|
||||||
c->tty.mouse_slider_mpos = -1;
|
c->tty.mouse_slider_mpos = -1;
|
||||||
}
|
}
|
||||||
@@ -964,24 +965,24 @@ have_event:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key == KEYC_UNKNOWN) {
|
if (key == KEYC_UNKNOWN) {
|
||||||
/* Adjust the button number */
|
/* Adjust the button number. */
|
||||||
if (b == MOUSE_BUTTON_1)
|
if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_1)
|
||||||
bn = 1;
|
bn = 1;
|
||||||
else if (b == MOUSE_BUTTON_2)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_2)
|
||||||
bn = 2;
|
bn = 2;
|
||||||
else if (b == MOUSE_BUTTON_3)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_3)
|
||||||
bn = 3;
|
bn = 3;
|
||||||
else if (b == MOUSE_BUTTON_6)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_6)
|
||||||
bn = 6;
|
bn = 6;
|
||||||
else if (b == MOUSE_BUTTON_7)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_7)
|
||||||
bn = 7;
|
bn = 7;
|
||||||
else if (b == MOUSE_BUTTON_8)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_8)
|
||||||
bn = 8;
|
bn = 8;
|
||||||
else if (b == MOUSE_BUTTON_9)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_9)
|
||||||
bn = 9;
|
bn = 9;
|
||||||
else if (b == MOUSE_BUTTON_10)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_10)
|
||||||
bn = 10;
|
bn = 10;
|
||||||
else if (b == MOUSE_BUTTON_11)
|
else if (MOUSE_BUTTONS(b) == MOUSE_BUTTON_11)
|
||||||
bn = 11;
|
bn = 11;
|
||||||
else
|
else
|
||||||
bn = 0;
|
bn = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user