set focus to window without mouse click (after dropping a file)
in
Integration and Hardware
•
1 year ago
Hello processing friends,
I use the very helpful sojamo.drop.* library to drag and drop sound files into my application. Then, when I press a key on the keyboard, I want to trigger those soundfiles. However, right now, I always have to click to the P5-application with the mouse first in order to to give the application the focus. I would like to automatically give my p5-app the focus when it registeres that a file has been dropped. I have already tried several things like frame.setAlwaysOnTop(true) and requestFocus() and so on but none of them seem to work. I am working on a Mac with Lion and am wondering if this is possible after all?
I would appreciatie your help a lot!
Best regards and many thanks!
Hanna
1