Skip to content

Instantly share code, notes, and snippets.

@brendandawes
Created July 18, 2022 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendandawes/ec308f6a945dc2323aa2bd1372fca579 to your computer and use it in GitHub Desktop.
Save brendandawes/ec308f6a945dc2323aa2bd1372fca579 to your computer and use it in GitHub Desktop.
Processing:detect windows platform and bring window to have focus
// Useful for installations on windows which detect user interaction
if (platform == WINDOWS){
if (frameCount > 1000){
((java.awt.Canvas) surface.getNative()).requestFocus();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment