mirror of
https://github.com/tmux/tmux.git
synced 2025-01-09 09:38:48 +00:00
Remove mouse and tidy.
This commit is contained in:
parent
aaeb8cb37d
commit
78b9096c38
@ -30,8 +30,8 @@ const struct cmd_entry cmd_copy_mode_entry = {
|
|||||||
.name = "copy-mode",
|
.name = "copy-mode",
|
||||||
.alias = NULL,
|
.alias = NULL,
|
||||||
|
|
||||||
.args = { "deHMs:t:uqS", 0, 0, NULL },
|
.args = { "deHMs:t:uq", 0, 0, NULL },
|
||||||
.usage = "[-deHMuqS] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
.usage = "[-deHMuq] [-s src-pane] " CMD_TARGET_PANE_USAGE,
|
||||||
|
|
||||||
.source = { 's', CMD_FIND_PANE, 0 },
|
.source = { 's', CMD_FIND_PANE, 0 },
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
@ -92,12 +92,7 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
if (args_has(args, 'u'))
|
if (args_has(args, 'u'))
|
||||||
window_copy_pageup(wp, 0);
|
window_copy_pageup(wp, 0);
|
||||||
if (args_has(args, 'd'))
|
if (args_has(args, 'd'))
|
||||||
window_copy_pagedown(wp, 0, args_has(args, 'e'));
|
window_copy_pagedown(wp, 0, args_has(args, 'e'));
|
||||||
if (args_has(args, 'S')) {
|
|
||||||
window_copy_scroll(wp, c->tty.mouse_slider_mpos,
|
|
||||||
event->m.y, args_has(args, 'e'));
|
|
||||||
return (CMD_RETURN_NORMAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
@ -640,9 +640,6 @@ key_bindings_init(void)
|
|||||||
"bind -Tcopy-mode-vi M-x { send -X jump-to-mark }",
|
"bind -Tcopy-mode-vi M-x { send -X jump-to-mark }",
|
||||||
"bind -Tcopy-mode-vi C-Up { send -X scroll-up }",
|
"bind -Tcopy-mode-vi C-Up { send -X scroll-up }",
|
||||||
"bind -Tcopy-mode-vi C-Down { send -X scroll-down }",
|
"bind -Tcopy-mode-vi C-Down { send -X scroll-down }",
|
||||||
"bind -n MouseDown1ScrollbarUp { copy-mode -u }",
|
|
||||||
"bind -n MouseDown1ScrollbarDown { copy-mode -d }",
|
|
||||||
"bind -n MouseDrag1ScrollbarSlider { copy-mode -S }"
|
|
||||||
};
|
};
|
||||||
u_int i;
|
u_int i;
|
||||||
struct cmd_parse_result *pr;
|
struct cmd_parse_result *pr;
|
||||||
|
44
layout.c
44
layout.c
@ -119,7 +119,7 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
|
|||||||
case LAYOUT_LEFTRIGHT:
|
case LAYOUT_LEFTRIGHT:
|
||||||
case LAYOUT_TOPBOTTOM:
|
case LAYOUT_TOPBOTTOM:
|
||||||
TAILQ_FOREACH(lcchild, &lc->cells, entry)
|
TAILQ_FOREACH(lcchild, &lc->cells, entry)
|
||||||
layout_print_cell(lcchild, hdr, n + 1);
|
layout_print_cell(lcchild, hdr, n + 1);
|
||||||
break;
|
break;
|
||||||
case LAYOUT_WINDOWPANE:
|
case LAYOUT_WINDOWPANE:
|
||||||
break;
|
break;
|
||||||
@ -230,7 +230,7 @@ layout_fix_offsets1(struct layout_cell *lc)
|
|||||||
void
|
void
|
||||||
layout_fix_offsets(struct window *w)
|
layout_fix_offsets(struct window *w)
|
||||||
{
|
{
|
||||||
struct layout_cell *lc = w->layout_root;
|
struct layout_cell *lc = w->layout_root;
|
||||||
|
|
||||||
lc->xoff = 0;
|
lc->xoff = 0;
|
||||||
lc->yoff = 0;
|
lc->yoff = 0;
|
||||||
@ -291,14 +291,12 @@ layout_fix_panes(struct window *w, struct window_pane *skip)
|
|||||||
{
|
{
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
struct layout_cell *lc;
|
struct layout_cell *lc;
|
||||||
int status, scrollbars, sb_pos, sb_w;
|
int status, scrollbars, sb_pos;
|
||||||
u_int sx, sy;
|
u_int sx, sy, mode;
|
||||||
u_int mode;
|
|
||||||
|
|
||||||
status = options_get_number(w->options, "pane-border-status");
|
status = options_get_number(w->options, "pane-border-status");
|
||||||
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
||||||
sb_pos = options_get_number(w->options, "pane-scrollbars-position");
|
sb_pos = options_get_number(w->options, "pane-scrollbars-position");
|
||||||
sb_w = PANE_SCROLLBARS_WIDTH;
|
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if ((lc = wp->layout_cell) == NULL || wp == skip)
|
if ((lc = wp->layout_cell) == NULL || wp == skip)
|
||||||
@ -312,21 +310,18 @@ layout_fix_panes(struct window *w, struct window_pane *skip)
|
|||||||
if (layout_add_horizontal_border(w, lc, status)) {
|
if (layout_add_horizontal_border(w, lc, status)) {
|
||||||
if (status == PANE_STATUS_TOP)
|
if (status == PANE_STATUS_TOP)
|
||||||
wp->yoff++;
|
wp->yoff++;
|
||||||
sy = sy - 1;
|
sy--;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode = window_pane_mode(wp);
|
mode = window_pane_mode(wp);
|
||||||
|
if (scrollbars == PANE_SCROLLBARS_ALWAYS ||
|
||||||
if ((scrollbars == PANE_SCROLLBARS_ALWAYS) ||
|
|
||||||
(scrollbars == PANE_SCROLLBARS_MODAL &&
|
(scrollbars == PANE_SCROLLBARS_MODAL &&
|
||||||
mode != WINDOW_PANE_NO_MODE)) {
|
mode != WINDOW_PANE_NO_MODE)) {
|
||||||
if (sb_pos == PANE_SCROLLBARS_LEFT) {
|
if (sb_pos == PANE_SCROLLBARS_LEFT) {
|
||||||
sx = sx - sb_w;
|
sx = sx - PANE_SCROLLBARS_WIDTH;
|
||||||
wp->xoff = wp->xoff + sb_w;
|
wp->xoff = wp->xoff + PANE_SCROLLBARS_WIDTH;
|
||||||
} else {
|
} else /* sb_pos == PANE_SCROLLBARS_RIGHT */
|
||||||
/* sb_pos == PANE_SCROLLBARS_RIGHT */
|
sx = sx - PANE_SCROLLBARS_WIDTH;
|
||||||
sx = sx - sb_w;
|
|
||||||
}
|
|
||||||
wp->flags |= PANE_REDRAWSCROLLBAR;
|
wp->flags |= PANE_REDRAWSCROLLBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,18 +357,17 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
|
|||||||
{
|
{
|
||||||
struct layout_cell *lcchild;
|
struct layout_cell *lcchild;
|
||||||
u_int available, minimum;
|
u_int available, minimum;
|
||||||
int status, scrollbars, sb_w;
|
int status, scrollbars;
|
||||||
|
|
||||||
status = options_get_number(w->options, "pane-border-status");
|
status = options_get_number(w->options, "pane-border-status");
|
||||||
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
||||||
sb_w = PANE_SCROLLBARS_WIDTH;
|
|
||||||
|
|
||||||
if (lc->type == LAYOUT_WINDOWPANE) {
|
if (lc->type == LAYOUT_WINDOWPANE) {
|
||||||
/* Space available in this cell only. */
|
/* Space available in this cell only. */
|
||||||
if (type == LAYOUT_LEFTRIGHT) {
|
if (type == LAYOUT_LEFTRIGHT) {
|
||||||
available = lc->sx;
|
available = lc->sx;
|
||||||
if (scrollbars)
|
if (scrollbars)
|
||||||
minimum = PANE_MINIMUM + sb_w;
|
minimum = PANE_MINIMUM + PANE_SCROLLBARS_WIDTH;
|
||||||
else
|
else
|
||||||
minimum = PANE_MINIMUM;
|
minimum = PANE_MINIMUM;
|
||||||
} else {
|
} else {
|
||||||
@ -903,8 +897,8 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
|
|||||||
struct layout_cell *lc, *lcparent, *lcnew, *lc1, *lc2;
|
struct layout_cell *lc, *lcparent, *lcnew, *lc1, *lc2;
|
||||||
u_int sx, sy, xoff, yoff, size1, size2, minimum;
|
u_int sx, sy, xoff, yoff, size1, size2, minimum;
|
||||||
u_int new_size, saved_size, resize_first = 0;
|
u_int new_size, saved_size, resize_first = 0;
|
||||||
int full_size = (flags & SPAWN_FULLSIZE);
|
int full_size = (flags & SPAWN_FULLSIZE), status;
|
||||||
int status, scrollbars, sb_w;
|
int scrollbars;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If full_size is specified, add a new cell at the top of the window
|
* If full_size is specified, add a new cell at the top of the window
|
||||||
@ -916,7 +910,6 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
|
|||||||
lc = wp->layout_cell;
|
lc = wp->layout_cell;
|
||||||
status = options_get_number(wp->window->options, "pane-border-status");
|
status = options_get_number(wp->window->options, "pane-border-status");
|
||||||
scrollbars = options_get_number(wp->window->options, "pane-scrollbars");
|
scrollbars = options_get_number(wp->window->options, "pane-scrollbars");
|
||||||
sb_w = PANE_SCROLLBARS_WIDTH;
|
|
||||||
|
|
||||||
/* Copy the old cell size. */
|
/* Copy the old cell size. */
|
||||||
sx = lc->sx;
|
sx = lc->sx;
|
||||||
@ -928,7 +921,7 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case LAYOUT_LEFTRIGHT:
|
case LAYOUT_LEFTRIGHT:
|
||||||
if (scrollbars)
|
if (scrollbars)
|
||||||
minimum = PANE_MINIMUM * 2 + sb_w;
|
minimum = PANE_MINIMUM * 2 + PANE_SCROLLBARS_WIDTH;
|
||||||
else
|
else
|
||||||
minimum = PANE_MINIMUM * 2 + 1;
|
minimum = PANE_MINIMUM * 2 + 1;
|
||||||
if (sx < minimum)
|
if (sx < minimum)
|
||||||
@ -1092,7 +1085,7 @@ layout_spread_cell(struct window *w, struct layout_cell *parent)
|
|||||||
{
|
{
|
||||||
struct layout_cell *lc;
|
struct layout_cell *lc;
|
||||||
u_int number, each, size, this;
|
u_int number, each, size, this;
|
||||||
int change, changed, status, scrollbars, sb_w;
|
int change, changed, status, scrollbars;
|
||||||
|
|
||||||
number = 0;
|
number = 0;
|
||||||
TAILQ_FOREACH (lc, &parent->cells, entry)
|
TAILQ_FOREACH (lc, &parent->cells, entry)
|
||||||
@ -1101,11 +1094,10 @@ layout_spread_cell(struct window *w, struct layout_cell *parent)
|
|||||||
return (0);
|
return (0);
|
||||||
status = options_get_number(w->options, "pane-border-status");
|
status = options_get_number(w->options, "pane-border-status");
|
||||||
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
scrollbars = options_get_number(w->options, "pane-scrollbars");
|
||||||
sb_w = PANE_SCROLLBARS_WIDTH;
|
|
||||||
|
|
||||||
if (parent->type == LAYOUT_LEFTRIGHT) {
|
if (parent->type == LAYOUT_LEFTRIGHT) {
|
||||||
if (scrollbars)
|
if (scrollbars)
|
||||||
size = parent->sx - sb_w;
|
size = parent->sx - PANE_SCROLLBARS_WIDTH;
|
||||||
else
|
else
|
||||||
size = parent->sx;
|
size = parent->sx;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ options_array_set(struct options_entry *o, u_int idx, const char *value,
|
|||||||
struct options_array_item *a;
|
struct options_array_item *a;
|
||||||
char *new;
|
char *new;
|
||||||
struct cmd_parse_result *pr;
|
struct cmd_parse_result *pr;
|
||||||
long long number;
|
long long number;
|
||||||
|
|
||||||
if (!OPTIONS_IS_ARRAY(o)) {
|
if (!OPTIONS_IS_ARRAY(o)) {
|
||||||
if (cause != NULL)
|
if (cause != NULL)
|
||||||
@ -1171,11 +1171,8 @@ options_push_changes(const char *name)
|
|||||||
RB_FOREACH(wp, window_pane_tree, &all_window_panes)
|
RB_FOREACH(wp, window_pane_tree, &all_window_panes)
|
||||||
colour_palette_from_option(&wp->palette, wp->options);
|
colour_palette_from_option(&wp->palette, wp->options);
|
||||||
}
|
}
|
||||||
if (strcmp(name, "pane-border-status") == 0) {
|
if (strcmp(name, "pane-border-status") == 0 ||
|
||||||
RB_FOREACH(w, windows, &windows)
|
strcmp(name, "pane-scrollbars") == 0 ||
|
||||||
layout_fix_panes(w, NULL);
|
|
||||||
}
|
|
||||||
if (strcmp(name, "pane-scrollbars") == 0 ||
|
|
||||||
strcmp(name, "pane-scrollbars-position") == 0) {
|
strcmp(name, "pane-scrollbars-position") == 0) {
|
||||||
RB_FOREACH(w, windows, &windows)
|
RB_FOREACH(w, windows, &windows)
|
||||||
layout_fix_panes(w, NULL);
|
layout_fix_panes(w, NULL);
|
||||||
|
@ -1128,12 +1128,8 @@ screen_redraw_draw_pane_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
if (slider_y >= sb_h)
|
if (slider_y >= sb_h)
|
||||||
slider_y = sb_h - 1;
|
slider_y = sb_h - 1;
|
||||||
|
|
||||||
screen_redraw_draw_scrollbar(c, wp, sb_pos, sb_x, sb_y, sb_h,
|
screen_redraw_draw_scrollbar(c, wp, sb_pos, sb_x, sb_y, sb_h, slider_h,
|
||||||
slider_h, slider_y);
|
slider_y);
|
||||||
|
|
||||||
/* Store current position and height of the slider */
|
|
||||||
wp->sb_slider_y = slider_y; /* top of slider y pos in scrollbar */
|
|
||||||
wp->sb_slider_h = slider_h; /* height of slider */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
522
server-client.c
522
server-client.c
@ -66,7 +66,7 @@ RB_GENERATE(client_windows, client_window, entry, server_client_window_cmp);
|
|||||||
u_int
|
u_int
|
||||||
server_client_how_many(void)
|
server_client_how_many(void)
|
||||||
{
|
{
|
||||||
struct client *c;
|
struct client *c;
|
||||||
u_int n;
|
u_int n;
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
@ -572,7 +572,6 @@ server_client_check_mouse(struct client *c, struct key_event *event)
|
|||||||
{
|
{
|
||||||
struct mouse_event *m = &event->m;
|
struct mouse_event *m = &event->m;
|
||||||
struct session *s = c->session, *fs;
|
struct session *s = c->session, *fs;
|
||||||
struct options *wo = s->curw->window->options;
|
|
||||||
struct winlink *fwl;
|
struct winlink *fwl;
|
||||||
struct window_pane *wp, *fwp;
|
struct window_pane *wp, *fwp;
|
||||||
u_int x, y, b, sx, sy, px, py;
|
u_int x, y, b, sx, sy, px, py;
|
||||||
@ -580,9 +579,6 @@ server_client_check_mouse(struct client *c, struct key_event *event)
|
|||||||
key_code key;
|
key_code key;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct style_range *sr;
|
struct style_range *sr;
|
||||||
int pane_scrollbars, sb_w, pane_status;
|
|
||||||
u_int line = 0, sb_pos;
|
|
||||||
u_int slider_top, slider_bottom, where_in_slider = 0;
|
|
||||||
enum { NOTYPE,
|
enum { NOTYPE,
|
||||||
MOVE,
|
MOVE,
|
||||||
DOWN,
|
DOWN,
|
||||||
@ -598,11 +594,7 @@ server_client_check_mouse(struct client *c, struct key_event *event)
|
|||||||
STATUS_LEFT,
|
STATUS_LEFT,
|
||||||
STATUS_RIGHT,
|
STATUS_RIGHT,
|
||||||
STATUS_DEFAULT,
|
STATUS_DEFAULT,
|
||||||
BORDER,
|
BORDER } where = NOWHERE;
|
||||||
SCROLLBAR_UP,
|
|
||||||
SCROLLBAR_SLIDER,
|
|
||||||
SCROLLBAR_DOWN,
|
|
||||||
} where = NOWHERE;
|
|
||||||
|
|
||||||
log_debug("%s mouse %02x at %u,%u (last %u,%u) (%d)", c->name, m->b,
|
log_debug("%s mouse %02x at %u,%u (last %u,%u) (%d)", c->name, m->b,
|
||||||
m->x, m->y, m->lx, m->ly, c->tty.mouse_drag_flag);
|
m->x, m->y, m->lx, m->ly, c->tty.mouse_drag_flag);
|
||||||
@ -751,117 +743,54 @@ have_event:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Not on status line. Adjust position and check for border or pane. */
|
||||||
* Not on status line. Adjust position and check for
|
|
||||||
* border, pane, or scrollbar.
|
|
||||||
*/
|
|
||||||
if (where == NOWHERE) {
|
if (where == NOWHERE) {
|
||||||
if (c->tty.mouse_scrolling_flag) {
|
px = x;
|
||||||
where = SCROLLBAR_SLIDER;
|
if (m->statusat == 0 && y >= m->statuslines)
|
||||||
} else {
|
py = y - m->statuslines;
|
||||||
px = x;
|
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
||||||
if (m->statusat == 0 && y >= m->statuslines)
|
py = m->statusat - 1;
|
||||||
py = y - m->statuslines;
|
else
|
||||||
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
py = y;
|
||||||
py = m->statusat - 1;
|
|
||||||
else
|
|
||||||
py = y;
|
|
||||||
|
|
||||||
tty_window_offset(&c->tty, &m->ox, &m->oy, &sx, &sy);
|
tty_window_offset(&c->tty, &m->ox, &m->oy, &sx, &sy);
|
||||||
log_debug("mouse window @%u at %u,%u (%ux%u)",
|
log_debug("mouse window @%u at %u,%u (%ux%u)",
|
||||||
s->curw->window->id, m->ox, m->oy, sx, sy);
|
s->curw->window->id, m->ox, m->oy, sx, sy);
|
||||||
if (px > sx || py > sy)
|
if (px > sx || py > sy)
|
||||||
return (KEYC_UNKNOWN);
|
return (KEYC_UNKNOWN);
|
||||||
px = px + m->ox;
|
px = px + m->ox;
|
||||||
py = py + m->oy;
|
py = py + m->oy;
|
||||||
|
|
||||||
/* try inside the pane. */
|
/* Try the pane borders if not zoomed. */
|
||||||
wp = window_get_active_at(s->curw->window, px, py);
|
if (~s->curw->window->flags & WINDOW_ZOOMED) {
|
||||||
|
TAILQ_FOREACH(wp, &s->curw->window->panes, entry) {
|
||||||
if (wp == NULL)
|
if ((wp->xoff + wp->sx == px &&
|
||||||
return (KEYC_UNKNOWN);
|
wp->yoff <= 1 + py &&
|
||||||
|
wp->yoff + wp->sy >= py) ||
|
||||||
/* Try the scrollbar which is actually next to a pane */
|
(wp->yoff + wp->sy == py &&
|
||||||
pane_scrollbars = options_get_number(wo, "pane-scrollbars");
|
wp->xoff <= 1 + px &&
|
||||||
sb_pos = options_get_number(wo, "pane-scrollbars-position");
|
wp->xoff + wp->sx >= px))
|
||||||
if (pane_scrollbars == PANE_SCROLLBARS_ALWAYS ||
|
break;
|
||||||
(pane_scrollbars == PANE_SCROLLBARS_MODAL &&
|
|
||||||
window_pane_mode(wp) != WINDOW_PANE_NO_MODE))
|
|
||||||
sb_w = PANE_SCROLLBARS_WIDTH;
|
|
||||||
else
|
|
||||||
sb_w = 0;
|
|
||||||
|
|
||||||
pane_status = options_get_number(wo, "pane-border-status");
|
|
||||||
|
|
||||||
if (pane_status == PANE_STATUS_TOP)
|
|
||||||
line = wp->yoff - 1;
|
|
||||||
else if (pane_status == PANE_STATUS_BOTTOM)
|
|
||||||
line = wp->yoff + wp->sy;
|
|
||||||
|
|
||||||
/* check if py could lie within a scroller
|
|
||||||
* if pane at the top then py==0 included
|
|
||||||
* if pane not at the top, then yoff to yoff+sy
|
|
||||||
*/
|
|
||||||
if ((pane_status && py != line) ||
|
|
||||||
(wp->yoff == 0 && py < wp->sy) ||
|
|
||||||
(py >= wp->yoff && py < wp->yoff + wp->sy)) {
|
|
||||||
|
|
||||||
/* check if px lies within a scroller
|
|
||||||
log_debug("wps @%u at %u,%u (%ux%u)", wp->id,
|
|
||||||
m->ox, m->oy, px, py);
|
|
||||||
*/
|
|
||||||
if ((sb_pos == PANE_SCROLLBARS_RIGHT &&
|
|
||||||
(px >= wp->xoff + wp->sx &&
|
|
||||||
px < wp->xoff + wp->sx + sb_w)) ||
|
|
||||||
(sb_pos == PANE_SCROLLBARS_LEFT &&
|
|
||||||
(px >= wp->xoff - sb_w &&
|
|
||||||
px < wp->xoff))) {
|
|
||||||
|
|
||||||
/* definitely in the scrollbar */
|
|
||||||
slider_top = wp->yoff + wp->sb_slider_y;
|
|
||||||
slider_bottom = wp->yoff + wp->sb_slider_y + wp->sb_slider_h - 1;
|
|
||||||
if (py < slider_top)
|
|
||||||
where = SCROLLBAR_UP;
|
|
||||||
else if (py >= slider_top &&
|
|
||||||
py <= slider_bottom) {
|
|
||||||
where = SCROLLBAR_SLIDER;
|
|
||||||
where_in_slider = py - wp->sb_slider_y - wp->yoff;
|
|
||||||
} else
|
|
||||||
/* py > slider_bottom */
|
|
||||||
where = SCROLLBAR_DOWN;
|
|
||||||
} else {
|
|
||||||
where = PANE;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* Try the pane borders if not zoomed. */
|
|
||||||
if (~s->curw->window->flags & WINDOW_ZOOMED) {
|
|
||||||
TAILQ_FOREACH(wp, &s->curw->window->panes, entry) {
|
|
||||||
if ((wp->xoff + wp->sx == px &&
|
|
||||||
wp->yoff <= 1 + py &&
|
|
||||||
wp->yoff + wp->sy >= py) ||
|
|
||||||
(wp->yoff + wp->sy == py &&
|
|
||||||
wp->xoff <= 1 + px &&
|
|
||||||
wp->xoff + wp->sx >= px))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (wp != NULL)
|
|
||||||
where = BORDER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (wp != NULL)
|
||||||
if (where == PANE)
|
where = BORDER;
|
||||||
log_debug("mouse %u,%u on pane %%%u", x, y, wp->id);
|
|
||||||
else if (where == BORDER)
|
|
||||||
log_debug("mouse on pane %%%u border", wp->id);
|
|
||||||
else if (where == SCROLLBAR_UP ||
|
|
||||||
where == SCROLLBAR_SLIDER ||
|
|
||||||
where == SCROLLBAR_DOWN)
|
|
||||||
log_debug("mouse on pane %%%u scrollbar", wp->id);
|
|
||||||
m->wp = wp->id;
|
|
||||||
m->w = wp->window->id;
|
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
m->wp = -1;
|
/* Otherwise try inside the pane. */
|
||||||
|
if (where == NOWHERE) {
|
||||||
|
wp = window_get_active_at(s->curw->window, px, py);
|
||||||
|
if (wp != NULL)
|
||||||
|
where = PANE;
|
||||||
|
else
|
||||||
|
return (KEYC_UNKNOWN);
|
||||||
|
}
|
||||||
|
if (where == PANE)
|
||||||
|
log_debug("mouse %u,%u on pane %%%u", x, y, wp->id);
|
||||||
|
else if (where == BORDER)
|
||||||
|
log_debug("mouse on pane %%%u border", wp->id);
|
||||||
|
m->wp = wp->id;
|
||||||
|
m->w = wp->window->id;
|
||||||
|
}
|
||||||
|
|
||||||
/* Stop dragging if needed. */
|
/* Stop dragging if needed. */
|
||||||
if (type != DRAG && type != WHEEL && c->tty.mouse_drag_flag != 0) {
|
if (type != DRAG && type != WHEEL && c->tty.mouse_drag_flag != 0) {
|
||||||
@ -870,7 +799,6 @@ have_event:
|
|||||||
|
|
||||||
c->tty.mouse_drag_update = NULL;
|
c->tty.mouse_drag_update = NULL;
|
||||||
c->tty.mouse_drag_release = NULL;
|
c->tty.mouse_drag_release = NULL;
|
||||||
c->tty.mouse_scrolling_flag = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End a mouse drag by passing a MouseDragEnd key corresponding
|
* End a mouse drag by passing a MouseDragEnd key corresponding
|
||||||
@ -888,8 +816,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND1_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND1_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND1_BORDER;
|
key = KEYC_MOUSEDRAGEND1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -904,8 +830,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND2_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND2_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND2_BORDER;
|
key = KEYC_MOUSEDRAGEND2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -920,8 +844,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND3_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND3_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND3_BORDER;
|
key = KEYC_MOUSEDRAGEND3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -936,8 +858,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND6_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND6_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND6_BORDER;
|
key = KEYC_MOUSEDRAGEND6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -952,8 +872,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND7_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND7_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND7_BORDER;
|
key = KEYC_MOUSEDRAGEND7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -968,8 +886,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND8_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND8_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND8_BORDER;
|
key = KEYC_MOUSEDRAGEND8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -984,8 +900,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND9_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND9_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND9_BORDER;
|
key = KEYC_MOUSEDRAGEND9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1000,8 +914,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND10_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND10_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND10_BORDER;
|
key = KEYC_MOUSEDRAGEND10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1016,8 +928,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAGEND11_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAGEND11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAGEND11_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAGEND11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAGEND11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAGEND11_BORDER;
|
key = KEYC_MOUSEDRAGEND11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1026,7 +936,6 @@ have_event:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
c->tty.mouse_drag_flag = 0;
|
c->tty.mouse_drag_flag = 0;
|
||||||
c->tty.mouse_slider_mpos = -1;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1065,12 +974,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG1_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG1_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG1_BORDER;
|
key = KEYC_MOUSEDRAG1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1085,12 +988,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG2_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG2_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG2_BORDER;
|
key = KEYC_MOUSEDRAG2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1105,12 +1002,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG3_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG3_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG3_BORDER;
|
key = KEYC_MOUSEDRAG3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1125,12 +1016,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG6_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG6_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG6_BORDER;
|
key = KEYC_MOUSEDRAG6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1145,12 +1030,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG7_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG7_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG7_BORDER;
|
key = KEYC_MOUSEDRAG7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1165,12 +1044,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG8_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG8_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG8_BORDER;
|
key = KEYC_MOUSEDRAG8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1185,12 +1058,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG9_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG9_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG9_BORDER;
|
key = KEYC_MOUSEDRAG9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1205,12 +1072,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG10_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG10_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG10_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG10_BORDER;
|
key = KEYC_MOUSEDRAG10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1225,12 +1086,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDRAG11_STATUS_RIGHT;
|
key = KEYC_MOUSEDRAG11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDRAG11_STATUS_DEFAULT;
|
key = KEYC_MOUSEDRAG11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDRAG11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDRAG11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDRAG11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDRAG11_BORDER;
|
key = KEYC_MOUSEDRAG11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1239,16 +1094,9 @@ have_event:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Begin a drag by setting the flag to a non-zero value that
|
* Begin a drag by setting the flag to a non-zero value that
|
||||||
* corresponds to the mouse button in use. If starting to
|
* corresponds to the mouse button in use.
|
||||||
* drag the scrollbar, store the relative position in the
|
|
||||||
* slider where the user grabed.
|
|
||||||
*/
|
*/
|
||||||
c->tty.mouse_drag_flag = MOUSE_BUTTONS(b) + 1;
|
c->tty.mouse_drag_flag = MOUSE_BUTTONS(b) + 1;
|
||||||
if (c->tty.mouse_scrolling_flag == 0 &&
|
|
||||||
where == SCROLLBAR_SLIDER) {
|
|
||||||
c->tty.mouse_scrolling_flag = 1;
|
|
||||||
c->tty.mouse_slider_mpos = where_in_slider;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case WHEEL:
|
case WHEEL:
|
||||||
if (MOUSE_BUTTONS(b) == MOUSE_WHEEL_UP) {
|
if (MOUSE_BUTTONS(b) == MOUSE_WHEEL_UP) {
|
||||||
@ -1292,12 +1140,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP1_STATUS_RIGHT;
|
key = KEYC_MOUSEUP1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP1_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP1_BORDER;
|
key = KEYC_MOUSEUP1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1312,12 +1154,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP2_STATUS_RIGHT;
|
key = KEYC_MOUSEUP2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP2_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP2_BORDER;
|
key = KEYC_MOUSEUP2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1332,12 +1168,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP3_STATUS_RIGHT;
|
key = KEYC_MOUSEUP3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP3_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP3_BORDER;
|
key = KEYC_MOUSEUP3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1352,12 +1182,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP6_STATUS_RIGHT;
|
key = KEYC_MOUSEUP6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP6_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP6_BORDER;
|
key = KEYC_MOUSEUP6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1372,12 +1196,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP7_STATUS_RIGHT;
|
key = KEYC_MOUSEUP7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP7_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP7_BORDER;
|
key = KEYC_MOUSEUP7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1392,12 +1210,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP8_STATUS_RIGHT;
|
key = KEYC_MOUSEUP8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP8_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP8_BORDER;
|
key = KEYC_MOUSEUP8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1412,12 +1224,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP9_STATUS_RIGHT;
|
key = KEYC_MOUSEUP9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP9_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP9_BORDER;
|
key = KEYC_MOUSEUP9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1431,13 +1237,7 @@ have_event:
|
|||||||
if (where == STATUS_RIGHT)
|
if (where == STATUS_RIGHT)
|
||||||
key = KEYC_MOUSEUP1_STATUS_RIGHT;
|
key = KEYC_MOUSEUP1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP10_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP1_BORDER;
|
key = KEYC_MOUSEUP1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1452,12 +1252,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEUP11_STATUS_RIGHT;
|
key = KEYC_MOUSEUP11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEUP11_STATUS_DEFAULT;
|
key = KEYC_MOUSEUP11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEUP11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEUP11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEUP11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEUP11_BORDER;
|
key = KEYC_MOUSEUP11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1476,12 +1270,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN1_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN1_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN1_BORDER;
|
key = KEYC_MOUSEDOWN1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1496,12 +1284,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN2_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN2_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN2_BORDER;
|
key = KEYC_MOUSEDOWN2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1516,12 +1298,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN3_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN3_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN3_BORDER;
|
key = KEYC_MOUSEDOWN3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1536,12 +1312,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN6_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN6_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN6_BORDER;
|
key = KEYC_MOUSEDOWN6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1556,12 +1326,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN7_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN7_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN7_BORDER;
|
key = KEYC_MOUSEDOWN7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1576,12 +1340,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN8_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN8_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN8_BORDER;
|
key = KEYC_MOUSEDOWN8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1596,12 +1354,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN9_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN9_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN9_BORDER;
|
key = KEYC_MOUSEDOWN9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1616,12 +1368,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN10_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN10_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN10_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN10_BORDER;
|
key = KEYC_MOUSEDOWN10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1636,12 +1382,6 @@ have_event:
|
|||||||
key = KEYC_MOUSEDOWN11_STATUS_RIGHT;
|
key = KEYC_MOUSEDOWN11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_MOUSEDOWN11_STATUS_DEFAULT;
|
key = KEYC_MOUSEDOWN11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_MOUSEDOWN11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_MOUSEDOWN11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_MOUSEDOWN11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_MOUSEDOWN11_BORDER;
|
key = KEYC_MOUSEDOWN11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1660,12 +1400,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK1_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK1_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK1_BORDER;
|
key = KEYC_SECONDCLICK1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1680,12 +1414,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK2_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK2_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK2_BORDER;
|
key = KEYC_SECONDCLICK2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1700,12 +1428,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK3_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK3_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK3_BORDER;
|
key = KEYC_SECONDCLICK3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1720,12 +1442,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK6_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK6_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK6_BORDER;
|
key = KEYC_SECONDCLICK6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1740,12 +1456,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK7_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK7_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK7_BORDER;
|
key = KEYC_SECONDCLICK7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1760,12 +1470,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK8_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK8_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK8_BORDER;
|
key = KEYC_SECONDCLICK8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1780,12 +1484,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK9_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK9_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK9_BORDER;
|
key = KEYC_SECONDCLICK9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1800,12 +1498,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK10_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK10_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK10_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK10_BORDER;
|
key = KEYC_SECONDCLICK10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1820,12 +1512,6 @@ have_event:
|
|||||||
key = KEYC_SECONDCLICK11_STATUS_RIGHT;
|
key = KEYC_SECONDCLICK11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_SECONDCLICK11_STATUS_DEFAULT;
|
key = KEYC_SECONDCLICK11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_SECONDCLICK11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_SECONDCLICK11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_SECONDCLICK11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_SECONDCLICK11_BORDER;
|
key = KEYC_SECONDCLICK11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1844,12 +1530,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK1_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK1_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK1_BORDER;
|
key = KEYC_DOUBLECLICK1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1864,12 +1544,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK2_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK2_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK2_BORDER;
|
key = KEYC_DOUBLECLICK2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1884,12 +1558,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK3_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK3_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK3_BORDER;
|
key = KEYC_DOUBLECLICK3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1904,12 +1572,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK6_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK6_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK6_BORDER;
|
key = KEYC_DOUBLECLICK6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1924,12 +1586,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK7_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK7_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK7_BORDER;
|
key = KEYC_DOUBLECLICK7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1944,12 +1600,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK8_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK8_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK8_BORDER;
|
key = KEYC_DOUBLECLICK8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1964,12 +1614,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK9_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK9_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK9_BORDER;
|
key = KEYC_DOUBLECLICK9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -1984,12 +1628,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK10_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK10_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK10_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK10_BORDER;
|
key = KEYC_DOUBLECLICK10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2004,12 +1642,6 @@ have_event:
|
|||||||
key = KEYC_DOUBLECLICK11_STATUS_RIGHT;
|
key = KEYC_DOUBLECLICK11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_DOUBLECLICK11_STATUS_DEFAULT;
|
key = KEYC_DOUBLECLICK11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_DOUBLECLICK11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_DOUBLECLICK11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_DOUBLECLICK11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_DOUBLECLICK11_BORDER;
|
key = KEYC_DOUBLECLICK11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2028,12 +1660,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK1_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK1_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK1_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK1_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK1_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK1_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK1_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK1_BORDER;
|
key = KEYC_TRIPLECLICK1_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2048,12 +1674,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK2_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK2_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK2_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK2_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK2_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK2_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK2_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK2_BORDER;
|
key = KEYC_TRIPLECLICK2_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2068,12 +1688,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK3_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK3_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK3_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK3_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK3_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK3_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK3_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK3_BORDER;
|
key = KEYC_TRIPLECLICK3_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2088,12 +1702,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK6_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK6_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK6_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK6_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK6_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK6_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK6_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK6_BORDER;
|
key = KEYC_TRIPLECLICK6_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2108,12 +1716,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK7_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK7_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK7_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK7_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK7_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK7_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK7_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK7_BORDER;
|
key = KEYC_TRIPLECLICK7_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2128,12 +1730,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK8_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK8_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK8_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK8_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK8_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK8_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK8_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK8_BORDER;
|
key = KEYC_TRIPLECLICK8_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2148,12 +1744,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK9_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK9_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK9_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK9_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK9_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK9_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK9_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK9_BORDER;
|
key = KEYC_TRIPLECLICK9_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2168,12 +1758,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK10_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK10_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK10_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK10_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK10_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK10_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK10_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK10_BORDER;
|
key = KEYC_TRIPLECLICK10_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2188,12 +1772,6 @@ have_event:
|
|||||||
key = KEYC_TRIPLECLICK11_STATUS_RIGHT;
|
key = KEYC_TRIPLECLICK11_STATUS_RIGHT;
|
||||||
if (where == STATUS_DEFAULT)
|
if (where == STATUS_DEFAULT)
|
||||||
key = KEYC_TRIPLECLICK11_STATUS_DEFAULT;
|
key = KEYC_TRIPLECLICK11_STATUS_DEFAULT;
|
||||||
if (where == SCROLLBAR_UP)
|
|
||||||
key = KEYC_TRIPLECLICK11_SCROLLBAR_UP;
|
|
||||||
if (where == SCROLLBAR_SLIDER)
|
|
||||||
key = KEYC_TRIPLECLICK11_SCROLLBAR_SLIDER;
|
|
||||||
if (where == SCROLLBAR_DOWN)
|
|
||||||
key = KEYC_TRIPLECLICK11_SCROLLBAR_DOWN;
|
|
||||||
if (where == BORDER)
|
if (where == BORDER)
|
||||||
key = KEYC_TRIPLECLICK11_BORDER;
|
key = KEYC_TRIPLECLICK11_BORDER;
|
||||||
break;
|
break;
|
||||||
@ -2228,7 +1806,7 @@ server_client_is_bracket_paste(struct client *c, key_code key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key == KEYC_PASTE_END) {
|
if (key == KEYC_PASTE_END) {
|
||||||
c->flags &= ~CLIENT_BRACKETPASTING;
|
c->flags &= ~CLIENT_BRACKETPASTING;
|
||||||
log_debug("%s: bracket paste off", c->name);
|
log_debug("%s: bracket paste off", c->name);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -3159,7 +2737,7 @@ server_client_check_redraw(struct client *c)
|
|||||||
*/
|
*/
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
redraw = 0;
|
redraw = 0;
|
||||||
if (wp->flags & (PANE_REDRAW))
|
if (wp->flags & PANE_REDRAW)
|
||||||
redraw = 1;
|
redraw = 1;
|
||||||
else if (c->flags & CLIENT_REDRAWPANES)
|
else if (c->flags & CLIENT_REDRAWPANES)
|
||||||
redraw = !!(c->redraw_panes & (1 << bit));
|
redraw = !!(c->redraw_panes & (1 << bit));
|
||||||
@ -3683,7 +3261,7 @@ const char *
|
|||||||
server_client_get_flags(struct client *c)
|
server_client_get_flags(struct client *c)
|
||||||
{
|
{
|
||||||
static char s[256];
|
static char s[256];
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
if (c->flags & CLIENT_ATTACHED)
|
if (c->flags & CLIENT_ATTACHED)
|
||||||
|
39
tmux.1
39
tmux.1
@ -2402,31 +2402,22 @@ The synopsis for the
|
|||||||
command is:
|
command is:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Xo Ic copy-mode
|
.It Xo Ic copy-mode
|
||||||
.Op Fl deHMquS
|
.Op Fl deHMqu
|
||||||
.Op Fl s Ar src-pane
|
.Op Fl s Ar src-pane
|
||||||
.Op Fl t Ar target-pane
|
.Op Fl t Ar target-pane
|
||||||
.Xc
|
.Xc
|
||||||
Enter copy mode.
|
Enter copy mode.
|
||||||
.Pp
|
|
||||||
.Fl u
|
.Fl u
|
||||||
enters copy mode and scrolls one page up and
|
also scrolls one page up after entering and
|
||||||
.Fl d
|
.Fl d
|
||||||
one page down.
|
one page down if already in copy mode.
|
||||||
|
.Fl M
|
||||||
|
begins a mouse drag (only valid if bound to a mouse key binding, see
|
||||||
|
.Sx MOUSE SUPPORT ) .
|
||||||
.Fl H
|
.Fl H
|
||||||
hides the position indicator in the top right.
|
hides the position indicator in the top right.
|
||||||
.Fl q
|
.Fl q
|
||||||
cancels copy mode and any other modes.
|
cancels copy mode and any other modes.
|
||||||
.Pp
|
|
||||||
.Fl M
|
|
||||||
begins a mouse drag (only valid if bound to a mouse key binding, see
|
|
||||||
.Sx MOUSE SUPPORT ) .
|
|
||||||
.Fl S
|
|
||||||
scrolls when bound to a mouse drag event; for example,
|
|
||||||
.Ic copy-mode -Se
|
|
||||||
is bound to
|
|
||||||
.Ar MouseDrag1ScrollbarSlider
|
|
||||||
by default.
|
|
||||||
.Pp
|
|
||||||
.Fl s
|
.Fl s
|
||||||
copies from
|
copies from
|
||||||
.Ar src-pane
|
.Ar src-pane
|
||||||
@ -5045,8 +5036,6 @@ of each pane.
|
|||||||
A filled section of the scrollbar, known as the
|
A filled section of the scrollbar, known as the
|
||||||
.Ql slider ,
|
.Ql slider ,
|
||||||
represents the position and size of the visible part of the pane content.
|
represents the position and size of the visible part of the pane content.
|
||||||
By default dragging the scrollbar slider up will enter copy mode; in copy
|
|
||||||
mode dragging the slider will scroll the pane.
|
|
||||||
.Pp
|
.Pp
|
||||||
If set to
|
If set to
|
||||||
.Ic on
|
.Ic on
|
||||||
@ -5060,16 +5049,8 @@ If set to
|
|||||||
.Ic modal ,
|
.Ic modal ,
|
||||||
the pane is narrowed only when the scrollbar is visible.
|
the pane is narrowed only when the scrollbar is visible.
|
||||||
.Pp
|
.Pp
|
||||||
When the
|
|
||||||
.Ic mouse
|
|
||||||
option is on, clicking above and below the slider pages up and down and dragging
|
|
||||||
the slider scrolls the pane.
|
|
||||||
.Pp
|
|
||||||
See also
|
See also
|
||||||
.Xr pane-scrollbar-style
|
.Xr pane-scrollbar-style .
|
||||||
and the scrollbar mouse events in the
|
|
||||||
.Sx MOUSE SUPPORT
|
|
||||||
section.
|
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic pane-scrollbar-style Ar style
|
.It Ic pane-scrollbar-style Ar style
|
||||||
Set the pane scrollbar style for the currently active pane.
|
Set the pane scrollbar style for the currently active pane.
|
||||||
@ -5083,8 +5064,7 @@ Attributes are ignored.
|
|||||||
.It Xo Ic pane-scrollbars-position
|
.It Xo Ic pane-scrollbars-position
|
||||||
.Op Ic left | right
|
.Op Ic left | right
|
||||||
.Xc
|
.Xc
|
||||||
Sets which side of the pane to display the pane scrollbars on. The
|
Sets which side of the pane to display pane scrollbars on.
|
||||||
default is right.
|
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic window-status-activity-style Ar style
|
.It Ic window-status-activity-style Ar style
|
||||||
Set status line style for windows with an activity alert.
|
Set status line style for windows with an activity alert.
|
||||||
@ -5458,9 +5438,6 @@ and a location suffix, one of the following:
|
|||||||
.It Li "StatusLeft" Ta "the left part of the status line"
|
.It Li "StatusLeft" Ta "the left part of the status line"
|
||||||
.It Li "StatusRight" Ta "the right part of the status line"
|
.It Li "StatusRight" Ta "the right part of the status line"
|
||||||
.It Li "StatusDefault" Ta "any other part of the status line"
|
.It Li "StatusDefault" Ta "any other part of the status line"
|
||||||
.It Li "ScrollbarSlider" Ta "the scrollbar slider"
|
|
||||||
.It Li "ScrollbarUp" Ta "above the scrollbar slider"
|
|
||||||
.It Li "ScrollbarDown" Ta "below the scrollbar slider"
|
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The following mouse events are available:
|
The following mouse events are available:
|
||||||
|
29
tmux.h
29
tmux.h
@ -184,19 +184,13 @@ struct winlink;
|
|||||||
KEYC_ ## name ## _STATUS_LEFT, \
|
KEYC_ ## name ## _STATUS_LEFT, \
|
||||||
KEYC_ ## name ## _STATUS_RIGHT, \
|
KEYC_ ## name ## _STATUS_RIGHT, \
|
||||||
KEYC_ ## name ## _STATUS_DEFAULT, \
|
KEYC_ ## name ## _STATUS_DEFAULT, \
|
||||||
KEYC_ ## name ## _SCROLLBAR_UP, \
|
|
||||||
KEYC_ ## name ## _SCROLLBAR_SLIDER, \
|
|
||||||
KEYC_ ## name ## _SCROLLBAR_DOWN, \
|
|
||||||
KEYC_ ## name ## _BORDER
|
KEYC_ ## name ## _BORDER
|
||||||
#define KEYC_MOUSE_STRING(name, s) \
|
#define KEYC_MOUSE_STRING(name, s) \
|
||||||
{ #s "Pane", KEYC_ ## name ## _PANE }, \
|
{ #s "Pane", KEYC_ ## name ## _PANE }, \
|
||||||
{ #s "Status", KEYC_ ## name ## _STATUS }, \
|
{ #s "Status", KEYC_ ## name ## _STATUS }, \
|
||||||
{ #s "StatusLeft", KEYC_ ## name ## _STATUS_LEFT }, \
|
{ #s "StatusLeft", KEYC_ ## name ## _STATUS_LEFT }, \
|
||||||
{ #s "StatusRight", KEYC_ ## name ## _STATUS_RIGHT }, \
|
{ #s "StatusRight", KEYC_ ## name ## _STATUS_RIGHT }, \
|
||||||
{ #s "StatusDefault", KEYC_ ## name ## _STATUS_DEFAULT }, \
|
{ #s "StatusDefault", KEYC_ ## name ## _STATUS_DEFAULT }, \
|
||||||
{ #s "ScrollbarUp", KEYC_ ## name ## _SCROLLBAR_UP }, \
|
|
||||||
{ #s "ScrollbarSlider", KEYC_ ## name ## _SCROLLBAR_SLIDER }, \
|
|
||||||
{ #s "ScrollbarDown", KEYC_ ## name ## _SCROLLBAR_DOWN }, \
|
|
||||||
{ #s "Border", KEYC_ ## name ## _BORDER }
|
{ #s "Border", KEYC_ ## name ## _BORDER }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1145,9 +1139,6 @@ struct window_pane {
|
|||||||
#define PANE_UNSEENCHANGES 0x2000
|
#define PANE_UNSEENCHANGES 0x2000
|
||||||
#define PANE_REDRAWSCROLLBAR 0x4000
|
#define PANE_REDRAWSCROLLBAR 0x4000
|
||||||
|
|
||||||
u_int sb_slider_y;
|
|
||||||
u_int sb_slider_h;
|
|
||||||
|
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
char *shell;
|
char *shell;
|
||||||
@ -1289,10 +1280,12 @@ TAILQ_HEAD(winlink_stack, winlink);
|
|||||||
#define PANE_STATUS_TOP 1
|
#define PANE_STATUS_TOP 1
|
||||||
#define PANE_STATUS_BOTTOM 2
|
#define PANE_STATUS_BOTTOM 2
|
||||||
|
|
||||||
/* Pane scrollbars options. */
|
/* Pane scrollbars option. */
|
||||||
#define PANE_SCROLLBARS_OFF 0
|
#define PANE_SCROLLBARS_OFF 0
|
||||||
#define PANE_SCROLLBARS_MODAL 1
|
#define PANE_SCROLLBARS_MODAL 1
|
||||||
#define PANE_SCROLLBARS_ALWAYS 2
|
#define PANE_SCROLLBARS_ALWAYS 2
|
||||||
|
|
||||||
|
/* Pane scrollbars position option. */
|
||||||
#define PANE_SCROLLBARS_RIGHT 0
|
#define PANE_SCROLLBARS_RIGHT 0
|
||||||
#define PANE_SCROLLBARS_LEFT 1
|
#define PANE_SCROLLBARS_LEFT 1
|
||||||
|
|
||||||
@ -1549,9 +1542,6 @@ struct tty {
|
|||||||
u_int mouse_last_y;
|
u_int mouse_last_y;
|
||||||
u_int mouse_last_b;
|
u_int mouse_last_b;
|
||||||
int mouse_drag_flag;
|
int mouse_drag_flag;
|
||||||
int mouse_scrolling_flag;
|
|
||||||
int mouse_slider_mpos;
|
|
||||||
|
|
||||||
void (*mouse_drag_update)(struct client *,
|
void (*mouse_drag_update)(struct client *,
|
||||||
struct mouse_event *);
|
struct mouse_event *);
|
||||||
void (*mouse_drag_release)(struct client *,
|
void (*mouse_drag_release)(struct client *,
|
||||||
@ -3316,7 +3306,6 @@ void printflike(3, 4) window_copy_add(struct window_pane *, int, const char *,
|
|||||||
...);
|
...);
|
||||||
void printflike(3, 0) window_copy_vadd(struct window_pane *, int, const char *,
|
void printflike(3, 0) window_copy_vadd(struct window_pane *, int, const char *,
|
||||||
va_list);
|
va_list);
|
||||||
void window_copy_scroll(struct window_pane *, int, u_int, int);
|
|
||||||
void window_copy_pageup(struct window_pane *, int);
|
void window_copy_pageup(struct window_pane *, int);
|
||||||
void window_copy_pagedown(struct window_pane *, int, int);
|
void window_copy_pagedown(struct window_pane *, int, int);
|
||||||
void window_copy_start_drag(struct client *, struct mouse_event *);
|
void window_copy_start_drag(struct client *, struct mouse_event *);
|
||||||
|
141
window-copy.c
141
window-copy.c
@ -40,8 +40,6 @@ static void window_copy_free(struct window_mode_entry *);
|
|||||||
static void window_copy_resize(struct window_mode_entry *, u_int, u_int);
|
static void window_copy_resize(struct window_mode_entry *, u_int, u_int);
|
||||||
static void window_copy_formats(struct window_mode_entry *,
|
static void window_copy_formats(struct window_mode_entry *,
|
||||||
struct format_tree *);
|
struct format_tree *);
|
||||||
static void window_copy_scroll1(struct window_mode_entry *,
|
|
||||||
struct window_pane *wp, int, u_int, int);
|
|
||||||
static void window_copy_pageup1(struct window_mode_entry *, int);
|
static void window_copy_pageup1(struct window_mode_entry *, int);
|
||||||
static int window_copy_pagedown1(struct window_mode_entry *, int, int);
|
static int window_copy_pagedown1(struct window_mode_entry *, int, int);
|
||||||
static void window_copy_next_paragraph(struct window_mode_entry *);
|
static void window_copy_next_paragraph(struct window_mode_entry *);
|
||||||
@ -276,7 +274,7 @@ struct window_copy_mode_data {
|
|||||||
u_int cx;
|
u_int cx;
|
||||||
u_int cy;
|
u_int cy;
|
||||||
|
|
||||||
u_int lastcx; /* position in last line w/ content */
|
u_int lastcx; /* position in last line w/ content */
|
||||||
u_int lastsx; /* size of last line w/ content */
|
u_int lastsx; /* size of last line w/ content */
|
||||||
|
|
||||||
u_int mx; /* mark position */
|
u_int mx; /* mark position */
|
||||||
@ -548,7 +546,7 @@ window_copy_vadd(struct window_pane *wp, int parse, const char *fmt, va_list ap)
|
|||||||
struct window_copy_mode_data *data = wme->data;
|
struct window_copy_mode_data *data = wme->data;
|
||||||
struct screen *backing = data->backing;
|
struct screen *backing = data->backing;
|
||||||
struct screen *writing = data->writing;
|
struct screen *writing = data->writing;
|
||||||
struct screen_write_ctx writing_ctx, backing_ctx, ctx;
|
struct screen_write_ctx writing_ctx, backing_ctx, ctx;
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
u_int old_hsize, old_cy;
|
u_int old_hsize, old_cy;
|
||||||
u_int sx = screen_size_x(backing);
|
u_int sx = screen_size_x(backing);
|
||||||
@ -600,122 +598,6 @@ window_copy_vadd(struct window_pane *wp, int parse, const char *fmt, va_list ap)
|
|||||||
screen_write_stop(&ctx);
|
screen_write_stop(&ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
window_copy_scroll(struct window_pane *wp, int sl_mpos, u_int my,
|
|
||||||
int scroll_exit)
|
|
||||||
{
|
|
||||||
struct window_mode_entry *wme = TAILQ_FIRST(&wp->modes);
|
|
||||||
|
|
||||||
window_set_active_pane(wp->window, wp, 0);
|
|
||||||
|
|
||||||
if (wme != NULL) {
|
|
||||||
window_copy_scroll1(wme, wp, sl_mpos, my, scroll_exit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
window_copy_scroll1(struct window_mode_entry *wme, struct window_pane *wp,
|
|
||||||
int sl_mpos, u_int my, int scroll_exit)
|
|
||||||
{
|
|
||||||
struct window_copy_mode_data *data = wme->data;
|
|
||||||
u_int ox, oy, px, py, n, offset, size;
|
|
||||||
u_int new_offset, slider_y = wp->sb_slider_y;
|
|
||||||
u_int slider_height = wp->sb_slider_h;
|
|
||||||
u_int sb_height = wp->sy, sb_top = wp->yoff;
|
|
||||||
u_int sy = screen_size_y(data->backing);
|
|
||||||
int new_slider_y, delta;
|
|
||||||
|
|
||||||
log_debug("%s: slider %u mouse %u", __func__, slider_y, my);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sl_mpos is where in the slider the user is dragging, mouse
|
|
||||||
* is dragging this y point relative to top of slider.
|
|
||||||
*/
|
|
||||||
if (my <= sb_top + sl_mpos) {
|
|
||||||
/* Slider banged into top. */
|
|
||||||
new_slider_y = sb_top - wp->yoff;
|
|
||||||
} else if (my - sl_mpos > sb_top + sb_height - slider_height) {
|
|
||||||
/* Slider banged into bottom. */
|
|
||||||
new_slider_y = sb_top - wp->yoff + (sb_height - slider_height);
|
|
||||||
} else {
|
|
||||||
/* Slider is somewhere in the middle. */
|
|
||||||
new_slider_y = my - wp->yoff - sl_mpos + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
log_debug("%s: new slider %u mouse %u", __func__, new_slider_y, my);
|
|
||||||
|
|
||||||
if (TAILQ_FIRST(&wp->modes) == NULL ||
|
|
||||||
window_copy_get_current_offset(wp, &offset, &size) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* See screen_redraw_draw_pane_scrollbar(), this is the inverse of the
|
|
||||||
* formula used there.
|
|
||||||
*/
|
|
||||||
new_offset = new_slider_y * ((float)(size + sb_height) / sb_height);
|
|
||||||
delta = (int)offset - new_offset;
|
|
||||||
|
|
||||||
log_debug("%s: delta %d mouse %u", __func__, delta, my);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Move pane view around based on delta relative to the cursor,
|
|
||||||
* maintaining the selection.
|
|
||||||
*/
|
|
||||||
oy = screen_hsize(data->backing) + data->cy - data->oy;
|
|
||||||
ox = window_copy_find_length(wme, oy);
|
|
||||||
|
|
||||||
if (data->cx != ox) {
|
|
||||||
data->lastcx = data->cx;
|
|
||||||
data->lastsx = ox;
|
|
||||||
}
|
|
||||||
data->cx = data->lastcx;
|
|
||||||
|
|
||||||
if (delta >= 0) {
|
|
||||||
n = (u_int)delta;
|
|
||||||
if (data->oy + n > screen_hsize(data->backing)) {
|
|
||||||
data->oy = screen_hsize(data->backing);
|
|
||||||
if (data->cy < n)
|
|
||||||
data->cy = 0;
|
|
||||||
else
|
|
||||||
data->cy -= n;
|
|
||||||
} else
|
|
||||||
data->oy += n;
|
|
||||||
} else {
|
|
||||||
n = (u_int)-delta;
|
|
||||||
if (data->oy < n) {
|
|
||||||
data->oy = 0;
|
|
||||||
if (data->cy + (n - data->oy) >= sy)
|
|
||||||
data->cy = sy - 1;
|
|
||||||
else
|
|
||||||
data->cy += n - data->oy;
|
|
||||||
} else
|
|
||||||
data->oy -= n;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't also drag tail when dragging a scrollbar, it looks weird. */
|
|
||||||
data->cursordrag = CURSORDRAG_NONE;
|
|
||||||
|
|
||||||
if (data->screen.sel == NULL || !data->rectflag) {
|
|
||||||
py = screen_hsize(data->backing) + data->cy - data->oy;
|
|
||||||
px = window_copy_find_length(wme, py);
|
|
||||||
if ((data->cx >= data->lastsx && data->cx != px) ||
|
|
||||||
data->cx > px)
|
|
||||||
window_copy_cursor_end_of_line(wme);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scroll_exit && data->oy == 0) {
|
|
||||||
window_pane_reset_mode(wp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data->searchmark != NULL && !data->timeout)
|
|
||||||
window_copy_search_marks(wme, NULL, data->searchregex, 1);
|
|
||||||
window_copy_update_selection(wme, 1, 0);
|
|
||||||
window_copy_redraw_screen(wme);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
window_copy_pageup(struct window_pane *wp, int half_page)
|
window_copy_pageup(struct window_pane *wp, int half_page)
|
||||||
{
|
{
|
||||||
@ -3921,12 +3803,12 @@ window_copy_search(struct window_mode_entry *wme, int direction, int regex)
|
|||||||
* beginning of the mark.
|
* beginning of the mark.
|
||||||
*/
|
*/
|
||||||
if (window_copy_search_mark_at(data, fx, fy,
|
if (window_copy_search_mark_at(data, fx, fy,
|
||||||
&start) == 0) {
|
&start) == 0) {
|
||||||
while (window_copy_search_mark_at(data, fx, fy,
|
while (window_copy_search_mark_at(data, fx, fy,
|
||||||
&at) == 0 &&
|
&at) == 0 &&
|
||||||
data->searchmark != NULL &&
|
data->searchmark != NULL &&
|
||||||
data->searchmark[at] ==
|
data->searchmark[at] ==
|
||||||
data->searchmark[start]) {
|
data->searchmark[start]) {
|
||||||
data->cx = fx;
|
data->cx = fx;
|
||||||
data->cy = fy -
|
data->cy = fy -
|
||||||
screen_hsize(data->backing) +
|
screen_hsize(data->backing) +
|
||||||
@ -4195,7 +4077,7 @@ window_copy_match_at_cursor(struct window_copy_mode_data *data)
|
|||||||
/*
|
/*
|
||||||
* Cells will not be set in the marked array unless they are valid text
|
* Cells will not be set in the marked array unless they are valid text
|
||||||
* and wrapping will be taken care of, so we can just copy.
|
* and wrapping will be taken care of, so we can just copy.
|
||||||
*/
|
*/
|
||||||
for (at = start; at <= end; at++) {
|
for (at = start; at <= end; at++) {
|
||||||
py = at / sx;
|
py = at / sx;
|
||||||
px = at - (py * sx);
|
px = at - (py * sx);
|
||||||
@ -4293,7 +4175,7 @@ window_copy_write_one(struct window_mode_entry *wme,
|
|||||||
struct window_copy_mode_data *data = wme->data;
|
struct window_copy_mode_data *data = wme->data;
|
||||||
struct grid *gd = data->backing->grid;
|
struct grid *gd = data->backing->grid;
|
||||||
struct grid_cell gc;
|
struct grid_cell gc;
|
||||||
u_int fx;
|
u_int fx;
|
||||||
|
|
||||||
screen_write_cursormove(ctx, 0, py, 0);
|
screen_write_cursormove(ctx, 0, py, 0);
|
||||||
for (fx = 0; fx < nx; fx++) {
|
for (fx = 0; fx < nx; fx++) {
|
||||||
@ -4374,13 +4256,10 @@ static void
|
|||||||
window_copy_write_lines(struct window_mode_entry *wme,
|
window_copy_write_lines(struct window_mode_entry *wme,
|
||||||
struct screen_write_ctx *ctx, u_int py, u_int ny)
|
struct screen_write_ctx *ctx, u_int py, u_int ny)
|
||||||
{
|
{
|
||||||
u_int yy;
|
u_int yy;
|
||||||
struct window_pane *wp = wme->wp;
|
|
||||||
|
|
||||||
for (yy = py; yy < py + ny; yy++)
|
for (yy = py; yy < py + ny; yy++)
|
||||||
window_copy_write_line(wme, ctx, py);
|
window_copy_write_line(wme, ctx, py);
|
||||||
|
|
||||||
wp->flags |= PANE_REDRAWSCROLLBAR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -4416,7 +4295,7 @@ window_copy_redraw_lines(struct window_mode_entry *wme, u_int py, u_int ny)
|
|||||||
{
|
{
|
||||||
struct window_pane *wp = wme->wp;
|
struct window_pane *wp = wme->wp;
|
||||||
struct window_copy_mode_data *data = wme->data;
|
struct window_copy_mode_data *data = wme->data;
|
||||||
struct screen_write_ctx ctx;
|
struct screen_write_ctx ctx;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
screen_write_start_pane(&ctx, wp, NULL);
|
screen_write_start_pane(&ctx, wp, NULL);
|
||||||
@ -4568,7 +4447,7 @@ window_copy_adjust_selection(struct window_mode_entry *wme, u_int *selx,
|
|||||||
{
|
{
|
||||||
struct window_copy_mode_data *data = wme->data;
|
struct window_copy_mode_data *data = wme->data;
|
||||||
struct screen *s = &data->screen;
|
struct screen *s = &data->screen;
|
||||||
u_int sx, sy, ty;
|
u_int sx, sy, ty;
|
||||||
int relpos;
|
int relpos;
|
||||||
|
|
||||||
sx = *selx;
|
sx = *selx;
|
||||||
|
19
window.c
19
window.c
@ -1117,7 +1117,6 @@ window_pane_set_mode(struct window_pane *wp, struct window_pane *swp,
|
|||||||
{
|
{
|
||||||
struct window_mode_entry *wme;
|
struct window_mode_entry *wme;
|
||||||
struct window *w = wp->window;
|
struct window *w = wp->window;
|
||||||
u_int pane_scrollbars;
|
|
||||||
|
|
||||||
if (!TAILQ_EMPTY(&wp->modes) && TAILQ_FIRST(&wp->modes)->mode == mode)
|
if (!TAILQ_EMPTY(&wp->modes) && TAILQ_FIRST(&wp->modes)->mode == mode)
|
||||||
return (1);
|
return (1);
|
||||||
@ -1138,13 +1137,10 @@ window_pane_set_mode(struct window_pane *wp, struct window_pane *swp,
|
|||||||
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
|
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
|
||||||
wme->screen = wme->mode->init(wme, fs, args);
|
wme->screen = wme->mode->init(wme, fs, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
wp->screen = wme->screen;
|
wp->screen = wme->screen;
|
||||||
wp->flags |= (PANE_REDRAW|PANE_CHANGED);
|
|
||||||
|
|
||||||
pane_scrollbars = options_get_number(w->options, "pane-scrollbars");
|
wp->flags |= (PANE_REDRAW|PANE_REDRAWSCROLLBAR|PANE_CHANGED);
|
||||||
if (pane_scrollbars == PANE_SCROLLBARS_MODAL)
|
layout_fix_panes(w, NULL);
|
||||||
layout_fix_panes(w, NULL);
|
|
||||||
|
|
||||||
server_redraw_window_borders(wp->window);
|
server_redraw_window_borders(wp->window);
|
||||||
server_status_window(wp->window);
|
server_status_window(wp->window);
|
||||||
@ -1158,7 +1154,6 @@ window_pane_reset_mode(struct window_pane *wp)
|
|||||||
{
|
{
|
||||||
struct window_mode_entry *wme, *next;
|
struct window_mode_entry *wme, *next;
|
||||||
struct window *w = wp->window;
|
struct window *w = wp->window;
|
||||||
u_int pane_scrollbars;
|
|
||||||
|
|
||||||
if (TAILQ_EMPTY(&wp->modes))
|
if (TAILQ_EMPTY(&wp->modes))
|
||||||
return;
|
return;
|
||||||
@ -1179,11 +1174,9 @@ window_pane_reset_mode(struct window_pane *wp)
|
|||||||
if (next->mode->resize != NULL)
|
if (next->mode->resize != NULL)
|
||||||
next->mode->resize(next, wp->sx, wp->sy);
|
next->mode->resize(next, wp->sx, wp->sy);
|
||||||
}
|
}
|
||||||
wp->flags |= (PANE_REDRAW|PANE_REDRAWSCROLLBAR|PANE_CHANGED);
|
|
||||||
|
|
||||||
pane_scrollbars = options_get_number(w->options, "pane-scrollbars");
|
wp->flags |= (PANE_REDRAW|PANE_REDRAWSCROLLBAR|PANE_CHANGED);
|
||||||
if (pane_scrollbars != PANE_SCROLLBARS_OFF)
|
layout_fix_panes(w, NULL);
|
||||||
layout_fix_panes(w, NULL);
|
|
||||||
|
|
||||||
server_redraw_window_borders(wp->window);
|
server_redraw_window_borders(wp->window);
|
||||||
server_status_window(wp->window);
|
server_status_window(wp->window);
|
||||||
@ -1200,7 +1193,7 @@ window_pane_reset_mode_all(struct window_pane *wp)
|
|||||||
static void
|
static void
|
||||||
window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len)
|
window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len)
|
||||||
{
|
{
|
||||||
struct window_pane *loop;
|
struct window_pane *loop;
|
||||||
|
|
||||||
TAILQ_FOREACH(loop, &wp->window->panes, entry) {
|
TAILQ_FOREACH(loop, &wp->window->panes, entry) {
|
||||||
if (loop != wp &&
|
if (loop != wp &&
|
||||||
@ -1218,7 +1211,7 @@ window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len)
|
|||||||
static void
|
static void
|
||||||
window_pane_copy_key(struct window_pane *wp, key_code key)
|
window_pane_copy_key(struct window_pane *wp, key_code key)
|
||||||
{
|
{
|
||||||
struct window_pane *loop;
|
struct window_pane *loop;
|
||||||
|
|
||||||
TAILQ_FOREACH(loop, &wp->window->panes, entry) {
|
TAILQ_FOREACH(loop, &wp->window->panes, entry) {
|
||||||
if (loop != wp &&
|
if (loop != wp &&
|
||||||
|
Loading…
Reference in New Issue
Block a user