mirror of
https://github.com/tmux/tmux.git
synced 2025-01-26 16:13:34 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
5e36d52651
@ -535,26 +535,32 @@ have_event:
|
|||||||
m->x = x + m->ox;
|
m->x = x + m->ox;
|
||||||
m->y = y + m->oy;
|
m->y = y + m->oy;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &s->curw->window->panes, entry) {
|
/* Try the pane borders if not zoomed. */
|
||||||
if ((wp->xoff + wp->sx == px &&
|
if (~s->curw->window->flags & WINDOW_ZOOMED) {
|
||||||
wp->yoff <= 1 + py &&
|
TAILQ_FOREACH(wp, &s->curw->window->panes, entry) {
|
||||||
wp->yoff + wp->sy >= py) ||
|
if ((wp->xoff + wp->sx == x &&
|
||||||
(wp->yoff + wp->sy == py &&
|
wp->yoff <= 1 + y &&
|
||||||
wp->xoff <= 1 + px &&
|
wp->yoff + wp->sy >= y) ||
|
||||||
wp->xoff + wp->sx >= px))
|
(wp->yoff + wp->sy == y &&
|
||||||
break;
|
wp->xoff <= 1 + x &&
|
||||||
|
wp->xoff + wp->sx >= x))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (wp != NULL)
|
||||||
|
where = BORDER;
|
||||||
}
|
}
|
||||||
if (wp != NULL)
|
|
||||||
where = BORDER;
|
/* Otherwise try inside the pane. */
|
||||||
else {
|
if (where == NOWHERE) {
|
||||||
wp = window_get_active_at(s->curw->window, px, py);
|
wp = window_get_active_at(s->curw->window, x, y);
|
||||||
if (wp != NULL)
|
if (wp != NULL)
|
||||||
where = PANE;
|
where = PANE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (where == NOWHERE)
|
if (where == NOWHERE)
|
||||||
return (KEYC_UNKNOWN);
|
return (KEYC_UNKNOWN);
|
||||||
if (where == PANE)
|
if (where == PANE)
|
||||||
log_debug("mouse %u,%u on pane %%%u", px, py, wp->id);
|
log_debug("mouse %u,%u on pane %%%u", x, y, wp->id);
|
||||||
else if (where == BORDER)
|
else if (where == BORDER)
|
||||||
log_debug("mouse on pane %%%u border", wp->id);
|
log_debug("mouse on pane %%%u border", wp->id);
|
||||||
m->wp = wp->id;
|
m->wp = wp->id;
|
||||||
|
Loading…
Reference in New Issue
Block a user