FAQ : Platform Support (Linux, Windows) : Q: How do I prevent mouse wheel events from generating walkbacks on Unix?
Q: How do I prevent mouse wheel events from generating walkbacks on Unix?
A: VA Smalltalk does not support mice with wheels. However, we recognize that this variety of mouse is more common than it once was. If you are using a mouse with a scroll wheel and are experiencing walkbacks when scrolling in normal browser windows, you can cause scrolling events to be ignored.
Mouse Wheel on Unix
Operating System(s) 
Solaris, Aix, SUSE, Red Hat, Ubuntu
Software Version(s) 
Va Smalltalk 7.x, 8.x
Introduction
VA Smalltalk does not support  the mouse with a scroll wheel. If a scroll-wheeled mouse is used with VA Smalltalk, it is generally harmless. The scroll wheel events are simply ignored. However, when scrolling text panes in normal browsers it is possible to experience walkbacks. The most common error is  'Primitive failed in: Object>>#at: due to Index out of  range in argument 1'
If you are using a mouse with a scroll wheel on a UNIX platform and are experiencing such errors, you can cause scrolling events to be ignored.
file in the following code snippet based on VA Smalltalk 7.0
code snippet 
 
!EwListInputMapper privateMethods !
 
doubleClickOccurred: aCwButtonEvent
"Answer true if the button click described by aCwButtonEvent is close enough in time
and distance to the previous button click to be considered a double click event."
 
| previousClick answer distance |
previousClick := self previousButtonDown at: aCwButtonEvent button ifAbsent: [^false].
distance := self doubleClickDistanceThreshhold.
answer := previousClick == nil
ifTrue: [false]
ifFalse: [
(previousClick xRoot - aCwButtonEvent xRoot) abs < distance and: [
(previousClick yRoot - aCwButtonEvent yRoot) abs < distance and: [
aCwButtonEvent time - previousClick time <= self doubleClickMillisecondThreshhold and: [
(self widget itemAtX: aCwButtonEvent x y: aCwButtonEvent y) ~~ nil]]]].
self previousButtonDown
at: aCwButtonEvent button
put: (answer ifTrue: [nil] ifFalse: [aCwButtonEvent]).
^answer!
 
processButtonPress: aCwButtonEvent
"A button press was detected. Determine if there is a previous mouse event that
would make this a double-click action. If not, then map this message into one
specific for the mouse button."
 
(self doubleClickOccurred: aCwButtonEvent)
ifTrue: [self processButtonDoubleClick: aCwButtonEvent]
ifFalse: [
aCwButtonEvent button <= doubleClickTriggered size
ifTrue: [self doubleClickTriggered at: aCwButtonEvent button put: false].
aCwButtonEvent button == 1
ifTrue: [^self processButton1Press: aCwButtonEvent].
aCwButtonEvent button == 2
ifTrue: [^self processButton2Press: aCwButtonEvent]]
!
 
processButtonRelease: aCwButtonEvent
"A button release was detected. Ignore it if it is the end of a double click action.
Otherwise, map this event into one that is specific for the mouse button."
 
(self doubleClickTriggered at: aCwButtonEvent button ifAbsent: [false])
ifTrue: [
self doubleClickTriggered at: aCwButtonEvent button put: false.
^self].
aCwButtonEvent button == 1
ifTrue: [^self processButton1Release: aCwButtonEvent].
aCwButtonEvent button == 2
ifTrue: [^self processButton2Release: aCwButtonEvent].
! !
Disclaimers
License agreement
Instantiations is pleased to provide sample code and utilities (hereinafter, the "Code") to you for your use free of charge, subject to the following terms and conditions, which apply no matter how you may have obtained the Code.
Instantiations grants you a royalty-free license to use, copy, distribute and modify the Code, but the Code may not be sold or licensed for a fee. You may also grant others the right to do the same. You understand that the Code is not supported by Instantiations in any manner, and that the Code is being provided AS IS, without a warranty of any kind. Instantiations does not warrant that the Code will meet any requirements that you may have or that the operation of the Code will be error free. Further, this license and the IBM copyright notice (see below) must be included with all copies of the Code that you make or distribute.

THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. INSTANTIATIONS DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY WITH RESPECT TO THE INFORMATION IN THIS DOCUMENT. BY FURNISHING THIS DOCUMENT, INSTANTIATIONS GRANTS NO LICENSES TO ANY PATENTS OR COPYRIGHTS.
 
Last modified date: 01/29/2015