OpenSolaris

Printable Version Enter a New Search
Bug ID 6372113
Synopsis Xorg generating spurious left-right wheel events
State 10-Fix Delivered (Fix available in build)
Category:Subcategory xserver:xorg-server
Keywords
Responsible Engineer Alan Coopersmith
Reported Against snv_31 , snv_36
Duplicate Of
Introduced In solaris_10u2
Commit to Fix snv_40
Fixed In snv_40
Release Fixed solaris_nevada(snv_40) , solaris_10u3(s10u3_01) (Bug ID:2139581)
Related Bugs
Submit Date 12-January-2006
Last Update Date 16-January-2007
Description
've noticed that while using the mouse wheel to scroll down in firefox, occasionally the browser will go back to the previous page. Guessing that this is the mouse driver (or some part of the mouse stack) sending left & right scroll events, I looked at xev output while scrolling the wheel and sure enough, there are button 6 & 7 events (this mouse doesn't have those buttons) if I scroll up & down:

Here's output from scrolling down a single click on the wheel:

ButtonPress event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3237904371, (45,38), root:(1524,736),
    state 0x0, button 5, same_screen YES

EnterNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3237904371, (45,38), root:(1524,736),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 4096

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  34  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

ButtonRelease event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3237904371, (45,38), root:(1524,736),
    state 0x1000, button 5, same_screen YES

LeaveNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3237904371, (45,38), root:(1524,736),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0


And up on the wheel:

ButtonPress event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3237945537, (61,32), root:(1540,730),
    state 0x0, button 4, same_screen YES

EnterNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3237945537, (61,32), root:(1540,730),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 2048

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  34  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

ButtonRelease event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3237945537, (61,32), root:(1540,730),
    state 0x800, button 4, same_screen YES

LeaveNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3237945537, (61,32), root:(1540,730),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0


Now if I do some random quick scroll-ups and then downs as fast as I can (making sure not to touch anything but the wheel) we can see there is a button 7 in there now:

ButtonPress event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115488, (41,46), root:(85,83),
    state 0x0, button 5, same_screen YES

EnterNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115488, (41,46), root:(85,83),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 4096

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  34  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

ButtonRelease event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115488, (41,46), root:(85,83),
    state 0x1000, button 5, same_screen YES

LeaveNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115488, (41,46), root:(85,83),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0

ButtonPress event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115506, (41,46), root:(85,83),
    state 0x0, button 7, same_screen YES

EnterNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115506, (41,46), root:(85,83),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  34  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

ButtonRelease event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115506, (41,46), root:(85,83),
    state 0x0, button 7, same_screen YES

LeaveNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115506, (41,46), root:(85,83),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0

ButtonPress event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115526, (41,46), root:(85,83),
    state 0x0, button 5, same_screen YES

EnterNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115526, (41,46), root:(85,83),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 4096

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  34  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

ButtonRelease event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x6e00003, time 3238115526, (41,46), root:(85,83),
    state 0x1000, button 5, same_screen YES

LeaveNotify event, serial 31, synthetic NO, window 0x6e00002,
    root 0x122, subw 0x0, time 3238115526, (41,46), root:(85,83),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 0
Work Around
Change or add this line in the "InputDevice" section for your mouse in /etc/X11/xorg.conf:
        Option      "ZAxisMapping" "4 5 4 5"

(The default ZAxisMapping in Xorg 6.9 is "4 5 6 7".)

With the workaround, Xorg will still think it's getting left/right events, 
but will report them to applications as simply more up/down events.   This
will break people actually using left/right capable devices, like the frkit
enabled Ferrari 3400 scroll pad/button/thingy.  The actual fix will allow 
both types of wheel events to work correctly.
Comments
N/A