On Wednesday, August 20, 2025 at 10:54:00 AM UTC-4 Edward K. Ream wrote:

On Wed, Aug 20, 2025 at 8:23 AM Thomas Passin <[email protected]> wrote:

Check out QApplication.focusWidget(). That could be a starting point. I 
doubt that Leo itself knows in most cases.


Leo must be aware of the focus widget in all situations. Binding wouldn't 
work otherwise.


I thought that most of that was handled by the Qt machinery rather than by 
specific Leo code.  For example, when a user clicks in a text edit box, Qt 
puts the focus there and directs the input to the box.  Leo gets that input 
by means of its registered callbacks so it can handle those input events. 
That's all I meant. In many cases Leo can handle the registered events 
without learning about the focus because if the focus weren't on the 
widget, those handlers wouldn't be getting called.

I'm glad to know about those get_focus() methods. I don't think I've used 
them or even known about them.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/fe0b979b-30ea-4b37-a6c7-53fca6beebean%40googlegroups.com.

Reply via email to