Hi Kevin,
First of all, thank you for your feedback!
Also, I want to clarify something, I'm not the author of the LAF framework (my brother David is) so there are a lot of design decisions that I'm not fully aware of, so I will ask him and invite him to participate in this thread.
Broadly speaking, a library like this generally functions in one of two ways:
As far as I can tell, the goal of the library is offering a standardized implementation, but trying to take advantage of some native features when needed.
For instance, why would I re-implement the full screen feature if I can use the native one? Well, at least that's what I thought at first.
But, I'm sure now you are wondering this again:
what led you to override "run" at all?
As I said, this was a design choice made by my brother, so I'm not aware of all the reason behind it, I'm pretty sure there are good reasons though. All I have to do is fixing this issue I'm reporting...after struggling quite a bit to make it work is that I've finally decided to try to get help from you.
However, I do have the freedom to try to modify/improve LAF framework, so I'm going to see if I can just override the sendEvent method and avoid using nextEventMatchingMask as you suggested. This will lead me to one of two possibilities:
Got a viable implementation
Realize about the reasons why we needed nextEventMatchingMask
I don't know if this is the exactly cause, but NSApplication.run's implementation creates and configures several private objects before it starts it's event loop and it also calls setWindowsNeedUpdate: (as well as other private methods) as it process events . Either or both of those could be causing the behavior you're seeing.
Tried calling setWindowsNeedUpdate and didn't make any difference, I'm sure that we are missing some logic inside those private methods. I just wanted to know if maybe we were missing something else. For instance, if we don't call finishLaunching method we got undesired behavior as well, so I wanted to discard that we are missing something like this.
Again, thank you for your help.