1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

BSD: Decrease indentation level. Treat buttons 4 & 5 as wheel. If you want

to use wheel mouse on the console run moused with -z 4 option.
This commit is contained in:
witekfl 2006-02-28 19:42:58 +01:00 committed by
parent 4b3d88dd6e
commit 90c013cbd0

View File

@ -5,6 +5,7 @@
#endif
#include "osdep/system.h"
#include <stdio.h>
#ifdef CONFIG_SYSMOUSE
#ifdef HAVE_SYS_CONSIO_H
@ -42,6 +43,7 @@ sysmouse_handler(void *data)
void *itrm = sp->itrm;
int fd = get_output_handle();
int buttons, change;
int extended_button;
mouse_info_t mi;
struct term_event_mouse mouse;
struct term_event ev;
@ -66,7 +68,10 @@ sysmouse_handler(void *data)
case 0:
switch (prev_buttons) {
case 0:
return;
extended_button = mi.u.data.buttons & 24;
if (!extended_button) return;
if (extended_button & 8) mouse.button = B_WHEEL_UP;
else mouse.button = B_WHEEL_DOWN;
break;
case 1:
case 3: