dix: fix inverted handling of legacy scroll button events
This bug led to inverted scrolling axes with drivers that support smooth scrolling axes but send legacy button events. Signed-off-by: Max Schwarz <Max@x-quadraht.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
911e7368bf
commit
765ef69295
|
@ -1330,21 +1330,22 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
|
||||||
double val, adj;
|
double val, adj;
|
||||||
int axis;
|
int axis;
|
||||||
|
|
||||||
|
/* Up is negative on valuators, down positive */
|
||||||
switch (buttons) {
|
switch (buttons) {
|
||||||
case 4:
|
case 4:
|
||||||
adj = 1.0;
|
adj = -1.0;
|
||||||
axis = v_scroll_axis;
|
axis = v_scroll_axis;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
adj = -1.0;
|
adj = 1.0;
|
||||||
axis = v_scroll_axis;
|
axis = v_scroll_axis;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
adj = 1.0;
|
adj = -1.0;
|
||||||
axis = h_scroll_axis;
|
axis = h_scroll_axis;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
adj = -1.0;
|
adj = 1.0;
|
||||||
axis = h_scroll_axis;
|
axis = h_scroll_axis;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue