mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Do not stop dragging when the wheel is pressed, from Artem Fokin.
This commit is contained in:
parent
5636d38a9d
commit
81f1d625af
@ -105,8 +105,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
if (args_has(args, 'A')) {
|
if (args_has(args, 'A')) {
|
||||||
/*
|
/*
|
||||||
* This item is now destined for
|
* This item is now destined for
|
||||||
* attach-session. Because attach-session
|
* attach-session. Because attach-session will
|
||||||
* will have already been prepared, copy this
|
* have already been prepared, copy this
|
||||||
* session into its tflag so it can be used.
|
* session into its tflag so it can be used.
|
||||||
*/
|
*/
|
||||||
cmd_find_from_session(&item->state.tflag, as);
|
cmd_find_from_session(&item->state.tflag, as);
|
||||||
|
@ -328,7 +328,7 @@ server_client_check_mouse(struct client *c)
|
|||||||
type = WHEEL;
|
type = WHEEL;
|
||||||
x = m->x, y = m->y, b = m->b;
|
x = m->x, y = m->y, b = m->b;
|
||||||
log_debug("wheel at %u,%u", x, y);
|
log_debug("wheel at %u,%u", x, y);
|
||||||
} else if (MOUSE_BUTTONS(m->b) == 3) {
|
} else if (MOUSE_RELEASE(m->b)) {
|
||||||
type = UP;
|
type = UP;
|
||||||
x = m->x, y = m->y, b = m->lb;
|
x = m->x, y = m->y, b = m->lb;
|
||||||
log_debug("up at %u,%u", x, y);
|
log_debug("up at %u,%u", x, y);
|
||||||
@ -423,7 +423,7 @@ have_event:
|
|||||||
m->wp = -1;
|
m->wp = -1;
|
||||||
|
|
||||||
/* Stop dragging if needed. */
|
/* Stop dragging if needed. */
|
||||||
if (type != DRAG && c->tty.mouse_drag_flag) {
|
if (type != DRAG && type != WHEEL && c->tty.mouse_drag_flag) {
|
||||||
if (c->tty.mouse_drag_release != NULL)
|
if (c->tty.mouse_drag_release != NULL)
|
||||||
c->tty.mouse_drag_release(c, m);
|
c->tty.mouse_drag_release(c, m);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user