I am writing a Java Swing application that should have a window that accepts mouse movement events when the application is not activated. Think of it as a global toolbar always on the table, which animates when the mouse passes over it.
From my research so far, I have seen that the Java Java JRE passes events when the application has focus.
This is not a limitation of the OS, so I was hoping there was a system property, an application package property, or a system call that activated inactive event processing. Otherwise, some method of global capture of mouse move events and transfer them to a Java application.
Thanks for any suggestions ...
Edit: Another question: as soon as the mouse events were captured, how do you feed them in Swing so that they are processed in the same way as in the case of explicit events on the operating system OS - by searching for the component under the mouse and sending the MouseEvent to him ...
java macos
Curiouspanda
source share