I have an idea for making sure apps deal with focus well, but it is pretty weird and contrived.
I would make Focus an actual object. It could also serve a functional purpose, but the main point is to make sure there is exactly one focus.
How this would work is that when giving focus, an actual FocusTracker object is given. The applet will probably store this in a Option. When the applet relinquishes focus, it gives the FocusTracker to the parent. I might need to add a function where the parent can call release_focus to force relinquishment.
I think it would be possible but discouraged for apps to create a focus tracker.
One possible function of the focus tracker is changing the focus.
I have an idea for making sure apps deal with focus well, but it is pretty weird and contrived.
I would make Focus an actual object. It could also serve a functional purpose, but the main point is to make sure there is exactly one focus.
How this would work is that when giving focus, an actual FocusTracker object is given. The applet will probably store this in a Option. When the applet relinquishes focus, it gives the FocusTracker to the parent. I might need to add a function where the parent can call release_focus to force relinquishment.
I think it would be possible but discouraged for apps to create a focus tracker.
One possible function of the focus tracker is changing the focus.