P6: How to get focus for mouse wheel event

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

P6: How to get focus for mouse wheel event

HilaireFernandes
Hi,

With Dr. Geo under P6 I have a usability regression with the
GeneralScrollPane of the File thumbnail dialog:

This dialog does not have any more the focus when open by default.

It is a problem when the user wants to browse with mouse wheel the
sketch previews. Indeed he needs to first click on the dialog then he
can browser with the mouse wheel.

The user click should be unnecessary.

How to ensure the mouse wheel event are sent by default to the
GeneralScrollPane?

It was the case with P3.

Hilaire


--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: P6: How to get focus for mouse wheel event

Nicolai Hess-3-2


2017-06-20 14:14 GMT+02:00 Hilaire <[hidden email]>:
Hi,

With Dr. Geo under P6 I have a usability regression with the
GeneralScrollPane of the File thumbnail dialog:

This dialog does not have any more the focus when open by default.

It is a problem when the user wants to browse with mouse wheel the
sketch previews. Indeed he needs to first click on the dialog then he
can browser with the mouse wheel.

The user click should be unnecessary.

How to ensure the mouse wheel event are sent by default to the
GeneralScrollPane?

It was the case with P3.

Hmm.
We fixed the mousefocus handling for openModal
(see case 14629 Morphic click event and modal windows get stuck)

But I guess , this now does not work as expected when the actual  mouse focus should be nil.
Because now the DrGeoThumbnailDialog holds the mouse focus and does not react on scroll events. Only if the
current mouse focus is nil the scrollevents are handled by the scrollpane)
 

Hilaire


--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: P6: How to get focus for mouse wheel event

HilaireFernandes
Is there a way I can manualy change it by code? I did have success to
find it.

Le 20/06/2017 à 21:23, Nicolai Hess a écrit :

> Hmm.
> We fixed the mousefocus handling for openModal
> (see case 14629
> <https://pharo.fogbugz.com/f/cases/14629/Morphic-click-event-and-modal-windows-get-stuck>
> Morphic click event and modal windows get stuck)
>
> But I guess , this now does not work as expected when the actual  mouse
> focus should be nil.
> Because now the DrGeoThumbnailDialog holds the mouse focus and does not
> react on scroll events. Only if the
> current mouse focus is nil the scrollevents are handled by the scrollpane)
>  

--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: P6: How to get focus for mouse wheel event

Nicolai Hess-3-2


2017-06-21 6:48 GMT+02:00 Hilaire <[hidden email]>:
Is there a way I can manualy change it by code? I did have success to
find it.


Ugly hack:

DrGFileThumbnailDialog>>#handleFocusEvent: anEvent
    (anEvent isMouse and: [ anEvent isMouseWheel ])
        ifTrue: [ self activeHand releaseMouseFocus: self ].
    ^ super handleFocusEvent: anEvent

I guess, this will swallow the first scroll event, but all following are handled by the scroll pane.

We should fix the openModal: method, to only change the mouse focus if the active focus holder isn't nil.

 
Le 20/06/2017 à 21:23, Nicolai Hess a écrit :
> Hmm.
> We fixed the mousefocus handling for openModal
> (see case 14629
> <https://pharo.fogbugz.com/f/cases/14629/Morphic-click-event-and-modal-windows-get-stuck>
> Morphic click event and modal windows get stuck)
>
> But I guess , this now does not work as expected when the actual  mouse
> focus should be nil.
> Because now the DrGeoThumbnailDialog holds the mouse focus and does not
> react on scroll events. Only if the
> current mouse focus is nil the scrollevents are handled by the scrollpane)
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: P6: How to get focus for mouse wheel event

HilaireFernandes
Thanks, I added your hack to the associated bug ticket.
https://bugs.launchpad.net/drgeo/+bug/1699113


Le 21/06/2017 à 11:15, Nicolai Hess a écrit :
> Ugly hack:

--
Dr. Geo
http://drgeo.eu