How to tell if the mouse is over the window?

If you add “focused” to your overMyWindow if statement, then it should return only if the sketch is focused.

2 Likes