-
-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freeze due to menu safe triangle event queue #870
Comments
no
no What you could do is use your own main method, disable safe triangle, and invoke application main method. class MyApp {
public static void main( String[] args ) {
UIManager.put( "Menu.useSafeTriangle", false );
com.application.App.main( args );
}
} Hint: Newer Java versions can execute single |
Hi Karl, thanks for your fast answer as usual! Unfortunately, I have limited possibilities... I can add system properties (and the product allows to set the look and feel through properties), I can alter the classpath, but I cannot change the way the main is invoked (hidden from me). Would it be possible to add a system property to switch off this queue-interfering business? Or else FlatLaf will not be a viable option for me 😞 Cheers, |
I wonder what "product" you use? Maybe it makes sense to disable this feature automatically if a custom event queue is used? |
It is a legacy application that has its own launcher (exe).
Hard to tell, I am not sure if having a custom event queue necessarily means that yours will freeze the application? So, as a first step, I think it would make sens to have a way to switch it off... don't you agree? 😉 |
Ok, I'll add a system property in the next release. If you need a solution now, remove following line and build flatlaf-core:
|
Thanks, but I cannot use unofficial versions of FlatLaf... Possible improvement to the properties logic: It would prevent unexpected freezes due to custom event queues for users who have no idea what the problem could be. |
…Triangle` to allow disabling submenu safe triangle for SWTSwing (issue #870) also check whether EventQueue.push() succeeded; if not, disable submenu safe triangle
implemented in latest Added system property Did not implement your suggestion because this would break some application that use FlatLaf (e.g. OpenPnP, jadx and Pixelitor). 3.5.1 release is coming soon... |
Hi Karl, Thanks a lot for the system property!! 😃
I am confused by this comment... Do you mean that you push your own queue even if a custom queue is already in place? Don't you think THAT is going to break the applications, since their queue will be ignored?
Good point! |
I meant that your suggestion would disable submenu safe triangle for existing applications that use FlatLaf and use a custom event queue.
Yes, that has not changed. This is done since FlatLaf 2.1.
Good question, but the FlatLaf submenu event queue is used only temporary for a short time while the mouse is over a JMenu that has submenus, or while moving within the safe triangle... A (temporary) custom event queue was the only solution (to my knowledge) to catch and ignore mouse events while mouse is moving within safe triangle. And this is a huge usability improvement for submenus and IMHO worth the risk of temporary loosing some feature of a custom application event queue. |
Hm, I wonder... Perhaps when a sub-menu is showing you could:
|
Hi!
I have an application that has its own event queue. This event queue must be the active event queue or else the application freezes. Unfortunately, when I show a menu under FlatLaf, the application freezes due to the safe triangle feature and its custom event queue.
Thus, I would like to deactivate the safe triangle feature, but I cannot change the code of the application.
Related:
apache/netbeans#4231
#490
Cheers,
-Christopher
The text was updated successfully, but these errors were encountered: