1
1

* screen.c (panel_event): Implement support for mouse wheel.

Этот коммит содержится в:
Pavel Roskin 2002-09-24 05:16:19 +00:00
родитель 2e3fc9234b
Коммит ac608302f8
3 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,7 @@
2002-09-24 Pavel Roskin <proski@gnu.org>
* screen.c (panel_event): Implement support for mouse wheel.
* view.c (display): Fix wrapping of tabs.
Reported by Arpad Biro <biro_arpad@yahoo.com>

Просмотреть файл

@ -14,8 +14,6 @@ Add support for mouse wheel with gpm.
Recheck all mouse handlers, make sure that they check button number.
Make mouse wheel work on the panels.
ncurses 5.2 turns off keypad under heavy load on xterm. Check if
anything can be done about it.

Просмотреть файл

@ -2282,16 +2282,29 @@ panel_event (Gpm_Event *event, WPanel *panel)
int my_index;
/* Mouse wheel events */
if ((event->buttons & GPM_B_UP) && (event->type & GPM_DOWN)) {
prev_page (panel);
return MOU_NORMAL;
}
if ((event->buttons & GPM_B_DOWN) && (event->type & GPM_DOWN)) {
next_page (panel);
return MOU_NORMAL;
}
/* "<" button */
if (event->type & GPM_DOWN && event->x == 1 + 1 && event->y == 0 + 1) {
directory_history_prev (panel);
return MOU_NORMAL;
}
/* ">" button */
if (event->type & GPM_DOWN && event->x == panel->widget.cols - 2 + 1 && event->y == 0 + 1) {
directory_history_next (panel);
return MOU_NORMAL;
}
/* "v" button */
if (event->type & GPM_DOWN && event->x == panel->widget.cols - 3 + 1 && event->y == 0 + 1) {
directory_history_list (panel);
return MOU_NORMAL;