Mouse wheel scrolling not working right on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Mouse wheel scrolling not working right on Windows

Jan Blizničenko
Hello

I am reposting this from Moose mailing list, because it seems like problem in Pharo itself.

In HandMorph>>#generateKeyboardEvent: is a condition based on charCode which tells whether incoming input event is of keyboard type or mousewheel type (code quoted below). On Linux, when I use mouse wheel, keyValue and charCode are both 30 or 31 respectively. But on Windows there is keyValue 30 or 31, but charCode 0. This condition is based on charCode being 30 or 31 so it absolutely never returns MouseWheelEvent. When I replace charCode with keyValue there, mouse wheel works fine (but I am not sure whether it might not break something else). Pharo core windows like System browser or Monticello seem to somehow get around it and work, but nothing else, like Roassal where I reported this bug before, so in whole Roassal mouse wheel does not work on Windows.

Jan Blizničenko

akevalion wrote
I checked this and I see that there is an error with:

HandMorph>>#generateKeyboardEvent:

in this piece of code:

(type = #keystroke and: [(buttons anyMask: 16)
and: [*charCode *= 30 or: [*charCode *= 31]]])
ifTrue: [^MouseWheelEvent new
setType: #mouseWheel
position: lastMouseEvent cursorPoint
direction: (charCode = 30 ifTrue: [#up] ifFalse: [#down])
buttons: buttons
hand: self
stamp: stamp].

The value for *charCode* is 0, that is the reason why MouseWheelEvent does
not work in Roassal2 in Windows.
Instead of MouseWheelEvent the KeyboardEvent is used.

*Note:* *keyvalue* has the value 31.

Maybe there is and error with Sensor class in Windows

Cheers,
Milton


2014-10-26 8:22 GMT-03:00 Alexandre Bergel <[hidden email]>:

> We will have a look at it. This is important indeed.
>
> Alexandre
>
>
> > Le 25-10-2014 à 20:48, "Jan B." <[hidden email]> a écrit :
> >
> > Hello
> >
> > RTZoomableView should enable zooming with mouse wheel. It works fine on
> > Linux, not tested on Mac, but doesn't work for me on Windows (mouse wheel
> > does nothing). For example, this one:
> > RTRoassalExample new exampleScrollZoom
> >
> > Jan
> >
> >
> >
> > --
> > View this message in context:
> http://forum.world.st/Roassal2-RTZoomableView-not-working-on-Windows-tp4786667.html
> > Sent from the Moose mailing list archive at Nabble.com.
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel scrolling not working right on Windows

stepharo
Thanks for the report.
This part will be cleaned as soon as we get some times and OSWindow
fully plugged.

Stef

On 28/10/14 05:00, Jan B. wrote:

> Hello
>
> I am reposting this from Moose mailing list, because it seems like problem
> in Pharo itself.
>
> In HandMorph>>#generateKeyboardEvent: is a condition based on charCode which
> tells whether incoming input event is of keyboard type or mousewheel type
> (code quoted below). On Linux, when I use mouse wheel, keyValue and charCode
> are both 30 or 31 respectively. But on Windows there is keyValue 30 or 31,
> but charCode 0. This condition is based on charCode being 30 or 31 so it
> absolutely never returns MouseWheelEvent. When I replace charCode with
> keyValue there, mouse wheel works fine (but I am not sure whether it might
> not break something else). Pharo core windows like System browser or
> Monticello seem to somehow get around it and work, but nothing else, like
> Roassal where I reported this bug before, so in whole Roassal mouse wheel
> does not work on Windows.
>
> Jan Blizničenko
>
>
> akevalion wrote
>> I checked this and I see that there is an error with:
>>
>> HandMorph>>#generateKeyboardEvent:
>>
>> in this piece of code:
>>
>> (type = #keystroke and: [(buttons anyMask: 16)
>> and: [*charCode *= 30 or: [*charCode *= 31]]])
>> ifTrue: [^MouseWheelEvent new
>> setType: #mouseWheel
>> position: lastMouseEvent cursorPoint
>> direction: (charCode = 30 ifTrue: [#up] ifFalse: [#down])
>> buttons: buttons
>> hand: self
>> stamp: stamp].
>>
>> The value for *charCode* is 0, that is the reason why MouseWheelEvent does
>> not work in Roassal2 in Windows.
>> Instead of MouseWheelEvent the KeyboardEvent is used.
>>
>> *Note:* *keyvalue* has the value 31.
>>
>> Maybe there is and error with Sensor class in Windows
>>
>> Cheers,
>> Milton
>>
>>
>> 2014-10-26 8:22 GMT-03:00 Alexandre Bergel &lt;
>> alexandre.bergel@
>> &gt;:
>>
>>> We will have a look at it. This is important indeed.
>>>
>>> Alexandre
>>>
>>>
>>>> Le 25-10-2014 à 20:48, "Jan B." &lt;
>> bliznjan@.cvut
>> &gt; a écrit :
>>>> Hello
>>>>
>>>> RTZoomableView should enable zooming with mouse wheel. It works fine on
>>>> Linux, not tested on Mac, but doesn't work for me on Windows (mouse
>>> wheel
>>>> does nothing). For example, this one:
>>>> RTRoassalExample new exampleScrollZoom
>>>>
>>>> Jan
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://forum.world.st/Roassal2-RTZoomableView-not-working-on-Windows-tp4786667.html
>>>> Sent from the Moose mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>>
>> Moose-dev@.unibe
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev@.unibe
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> View this message in context: http://forum.world.st/Mouse-wheel-scrolling-not-working-right-on-Windows-tp4787110.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel scrolling not working right on Windows

stepharo
In reply to this post by Jan Blizničenko
could you enter a bug entry
     - vm version
     - OS version
     - image version

Stef
On 28/10/14 05:00, Jan B. wrote:

> Hello
>
> I am reposting this from Moose mailing list, because it seems like problem
> in Pharo itself.
>
> In HandMorph>>#generateKeyboardEvent: is a condition based on charCode which
> tells whether incoming input event is of keyboard type or mousewheel type
> (code quoted below). On Linux, when I use mouse wheel, keyValue and charCode
> are both 30 or 31 respectively. But on Windows there is keyValue 30 or 31,
> but charCode 0. This condition is based on charCode being 30 or 31 so it
> absolutely never returns MouseWheelEvent. When I replace charCode with
> keyValue there, mouse wheel works fine (but I am not sure whether it might
> not break something else). Pharo core windows like System browser or
> Monticello seem to somehow get around it and work, but nothing else, like
> Roassal where I reported this bug before, so in whole Roassal mouse wheel
> does not work on Windows.
>
> Jan Blizničenko
>
>
> akevalion wrote
>> I checked this and I see that there is an error with:
>>
>> HandMorph>>#generateKeyboardEvent:
>>
>> in this piece of code:
>>
>> (type = #keystroke and: [(buttons anyMask: 16)
>> and: [*charCode *= 30 or: [*charCode *= 31]]])
>> ifTrue: [^MouseWheelEvent new
>> setType: #mouseWheel
>> position: lastMouseEvent cursorPoint
>> direction: (charCode = 30 ifTrue: [#up] ifFalse: [#down])
>> buttons: buttons
>> hand: self
>> stamp: stamp].
>>
>> The value for *charCode* is 0, that is the reason why MouseWheelEvent does
>> not work in Roassal2 in Windows.
>> Instead of MouseWheelEvent the KeyboardEvent is used.
>>
>> *Note:* *keyvalue* has the value 31.
>>
>> Maybe there is and error with Sensor class in Windows
>>
>> Cheers,
>> Milton
>>
>>
>> 2014-10-26 8:22 GMT-03:00 Alexandre Bergel &lt;
>> alexandre.bergel@
>> &gt;:
>>
>>> We will have a look at it. This is important indeed.
>>>
>>> Alexandre
>>>
>>>
>>>> Le 25-10-2014 à 20:48, "Jan B." &lt;
>> bliznjan@.cvut
>> &gt; a écrit :
>>>> Hello
>>>>
>>>> RTZoomableView should enable zooming with mouse wheel. It works fine on
>>>> Linux, not tested on Mac, but doesn't work for me on Windows (mouse
>>> wheel
>>>> does nothing). For example, this one:
>>>> RTRoassalExample new exampleScrollZoom
>>>>
>>>> Jan
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://forum.world.st/Roassal2-RTZoomableView-not-working-on-Windows-tp4786667.html
>>>> Sent from the Moose mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>>
>> Moose-dev@.unibe
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev@.unibe
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> View this message in context: http://forum.world.st/Mouse-wheel-scrolling-not-working-right-on-Windows-tp4787110.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Mouse wheel scrolling not working right on Windows

Jan Blizničenko
Done
Hope I did it right...

Jan

stepharo wrote
could you enter a bug entry
     - vm version
     - OS version
     - image version

Stef