version 1.9, 2009/09/10 17:16:24 |
version 1.10, 2009/10/11 07:01:10 |
|
|
void window_choose_resize(struct window_pane *, u_int, u_int); |
void window_choose_resize(struct window_pane *, u_int, u_int); |
void window_choose_key(struct window_pane *, struct client *, int); |
void window_choose_key(struct window_pane *, struct client *, int); |
void window_choose_mouse( |
void window_choose_mouse( |
struct window_pane *, struct client *, u_char, u_char, u_char); |
struct window_pane *, struct client *, struct mouse_event *); |
|
|
void window_choose_redraw_screen(struct window_pane *); |
void window_choose_redraw_screen(struct window_pane *); |
void window_choose_write_line( |
void window_choose_write_line( |
|
|
} |
} |
|
|
void |
void |
window_choose_mouse(struct window_pane *wp, |
window_choose_mouse( |
unused struct client *c, u_char b, u_char x, u_char y) |
struct window_pane *wp, unused struct client *c, struct mouse_event *m) |
{ |
{ |
struct window_choose_mode_data *data = wp->modedata; |
struct window_choose_mode_data *data = wp->modedata; |
struct screen *s = &data->screen; |
struct screen *s = &data->screen; |
struct window_choose_mode_item *item; |
struct window_choose_mode_item *item; |
u_int idx; |
u_int idx; |
|
|
if ((b & 3) == 3) |
if ((m->b & 3) == 3) |
return; |
return; |
if (x >= screen_size_x(s)) |
if (m->x >= screen_size_x(s)) |
return; |
return; |
if (y >= screen_size_y(s)) |
if (m->y >= screen_size_y(s)) |
return; |
return; |
|
|
idx = data->top + y; |
idx = data->top + m->y; |
if (idx >= ARRAY_LENGTH(&data->list)) |
if (idx >= ARRAY_LENGTH(&data->list)) |
return; |
return; |
data->selected = idx; |
data->selected = idx; |