[Cuis-dev] Mouse Focus

Gerald Klix cuis.01 at klix.ch
Tue Oct 19 13:25:32 PDT 2021

There is definitely something fishy with focus handling.
I only checked the behavior described below with Haver:

Sometimes -- I do not know the exact circumstances -- pressing Ctrl-W
does not close the window. I have to click on the window
to make it work.
Juan, you also may remember added a
package to zoom into a window by pressing control
and scroll in the window. I also added some hot keys (Ctrl-+, Ctrl--
and Ctrl-0) that show the same behavior as Ctrl-W.
This was the way how I discovered the problem.
As an Emacs user I usually try to avoid to press
Ctrl-W when not using Emacs, therefore I did not
find that behavior annoying enough to investigate.

I also remember that I changed the mouse focus handling
a bit, when I added mouse-wheel event handling.
I hope I did not break it (unnoticed until Hilaire tried
to really use it). I readily admit that I have no real clue
what problem this mouse focus solves in Cuis.
AFIR it has some influence on the handling of
modal menus, but I could not discover any other use.
(I might be wrong here).
IHMO it's just remembers which morph handled the
last mouse event, which is a piece of information which
is used seldom or not at all.

I will investigate and test with Cuis and Haver



On 10/19/21 9:12 PM, Hilaire Fernandes via Cuis-dev wrote:
> Good idea to inspect the hand!
> What I am observing is that, when I press my morph, the inspector shows 
> it gets the focus. Once I release the button, the focus is lost.
> So I try with button1up event. This time the focus sticks to my morph, 
> but then with the mouse I can't select any other morph. I need to show 
> the halo of any morph, so my morph looses the focus, then I can select 
> any morph then.
> There is likely something I don't understand. Likely what I want to use 
> is the keyboard focus.
> Joined is the code.
> Thanks
> Hilaire
> Le 19/10/2021 à 15:46, Juan Vuletich via Cuis-dev a écrit :
>> Just tried. Opened a WidgetMorph, sent to it
>> self setProperty: #handlesMouseDown: toValue: true
>> Then I opened an inspector on the hand.
>> When I click on the widget, the inspector shows it at ivar 
>> 'mouseFocus' in the hand. So, it seems to work OK here.
>> Please give instructions in enough detail to reproduce what you are 
>> doing.

More information about the Cuis-dev mailing list