lets make buttons 6 and 7 be another mouse wheel goign in another direction -

eh? :)


SVN revision: 15960
This commit is contained in:
Carsten Haitzler 2005-07-30 11:43:17 +00:00
parent ee18abd342
commit 34fd99a287
1 changed files with 22 additions and 4 deletions

View File

@ -276,7 +276,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
int did_triple = 0;
int i;
if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 6))
if ((xevent->xbutton.button > 3) && (xevent->xbutton.button < 8))
{
Ecore_X_Event_Mouse_Wheel *e;
@ -288,12 +288,30 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
e->modifiers = 0;
e->direction = 0;
e->z = 0;
if (xevent->xbutton.button == 4) e->z = -1;
else if (xevent->xbutton.button == 5) e->z = 1;
if (xevent->xbutton.button == 4)
{
e->direction = 0;
e->z = -1;
}
else if (xevent->xbutton.button == 5)
{
e->direction = 0;
e->z = 1;
}
else if (xevent->xbutton.button == 6)
{
e->direction = 1;
e->z = -1;
}
else if (xevent->xbutton.button == 7)
{
e->direction = 1;
e->z = 1;
}
e->x = xevent->xbutton.x;
e->y = xevent->xbutton.y;
e->root.x = xevent->xbutton.x_root;
e->root.y = xevent->xbutton.y_root;
e->root.y = xevent->xbutton.y_root;
if (xevent->xbutton.subwindow)
e->win = xevent->xbutton.subwindow;