[squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel"

marcel.taeumel Marcel.Taeumel at hpi.de
Sun Jun 12 05:49:42 UTC 2016


Chris Muller-3 wrote
> Hi Marcel, I updated a fresh Squeak5.1-15113 image.  After the update,
> the scrolling jumps to a chunky 9 lines per tick, and Control+[Up
> Arrow] or Control+[Down Arrow] seems to "triple scroll" for each press
> -- as if I had pressed it three times...
> 
> Maybe the problems are related?
> 
> On Tue, Jun 7, 2016 at 1:25 AM, marcel.taeumel <

> Marcel.Taeumel@

> > wrote:
>> Chris Muller-3 wrote
>>> It makes scrolling very choppy.  Instead of scrolling by 3-lines at a
>>> time, it scrolls by about 10...
>>>
>>> Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by
>>> mouseOverForKeyboardFocus?
>>>
>>> On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel <
>>
>>> Marcel.Taeumel@
>>
>>> > wrote:
>>>> Hi, there.
>>>>
>>>> Here is a change set that adds MouseWheelEvent and everything related
>>>> to
>>>> it
>>>> (including EventHandler):
>>>> mouse-wheel-events.cs
>>>> <http://forum.world.st/file/n4899428/mouse-wheel-events.cs>
>>>>
>>>> You have two new preferences (in "Morphic", "keyboard", "mouse"
>>>> categories):
>>>>
>>>> [x] Synthesize Mouse Wheel Events from Keyboard Events
>>>> [x] Send Mouse Wheel Events to Keyboard Focus
>>>>
>>>> Both are enabled by default.
>>>>
>>>> I refactored the old-style wheel scrolling to use an event filter in
>>>> ScrollPane but this is regarded a fall-back only and can be used for
>>>> old
>>>> applications.
>>>>
>>>> The mouse wheel event synthesis is implemented as keyboard event
>>>> capture
>>>> filter in HandMorph itself. See the changeset's postload script or
>>>> HandMorph
>>>>>> #initForEvents. Once our VMs deliver real mouse wheel events, we can
>>>> change that and adapt HandMorph >> #generateMouseEvent:.
>>>>
>>>> The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used
>>>> to
>>>> switch between Windows and OS X behavior.
>>>>
>>>> Please, try it out.
>>>>
>>>> Best,
>>>> Marcel
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html
>>>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>>>
>>
>> Hi Chris,
>>
>> there should be no change in the observable behavior by this change. In
>> my
>> image, it still scrolls 3 text lines in a text morph and 3 items in a
>> list
>> morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane
>> >>
>> #scrollByKeyboard:). Could you please inspect the vertical scrollbar of
>> one
>> text morph and one list morph and tell me the value of "scrollDelta"?
>> And,
>> if you have time, could you try it in a fresh Squeak Trunk image? You are
>> working under Ubuntu Linux?
>>
>> If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse
>> Wheel
>> to Keyboard Focus" has no effect because the keyboard focus is always
>> where
>> the mouse cursor is. However, there are many users that do disable
>> #mouseOverForKeyboardFocus and wished for the Mac behavior for a very
>> long
>> time. Bert, for example. Now, you can make scrolling by mouse wheel
>> behave
>> like on the Mac:
>>
>> [ ] mouseOverForKeyboardFocus
>> [x] Send Mouse Wheel Events to Keyboard Focus
>> [x] Synthesize Mouse Wheel Events from Keyboard Events
>>
>> Best,
>> Marcel
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899504.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>

Hi Chris,

is the behavior different if you disable "Synthesize Mouse Wheel Events from
Keyboard Events"?

I did found a regression:
http://forum.world.st/The-Trunk-Morphic-mt-1177-mcz-tp4900535.html

But this does not affect the filter in HandMorph where MouseWheel events are
synthesized. Hmmm... What happens if you modify ScrollPane >> #mouseWheel:
an change 3 to 1? Still, this is only a workaround because the 3 denotes 3
lines/items to scroll...

Hmmm.... can you monitor for me how many CTRL+up/down events are produced on
your platform? Just add a "Transcript showln: anEvent" to HandMorph >>
showEvent:, maybe with an "anEvent isKeyboard" check. How many do you get
when you operate the mouse wheel? I get only keystrokes:

[275 at 294 keystroke '<Ctrl-down>' 514791296]
[275 at 294 keystroke '<Ctrl-up>' 514792218]
[275 at 294 keystroke '<Ctrl-down>' 514796140]
[275 at 294 keystroke '<Ctrl-up>' 514796593]
[275 at 294 keystroke '<Ctrl-down>' 514796890]
[275 at 294 keystroke '<Ctrl-up>' 514797171]
[275 at 294 keystroke '<Ctrl-down>' 514797484]
[275 at 294 keystroke '<Ctrl-up>' 514797843]
[275 at 294 keystroke '<Ctrl-down>' 514798281]

In a recent CogVM in Windows 10.

Best,
Marcel



--
View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4900536.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list