Prevent Sketch from closing?

This is a bit of a weird one, but is there a way to stop a sketch from closing? I have found a way to prevent the escape key from closing the sketch, but is there a way to stop the x and double clicking the menu from closing the sketch?

1 Like

Please don’t bump threads, especially after only waiting a few hours for a reply.

You might want to look into the setUndecorated() function.

But why do you want to do this?

1 Like

I have an AI that learns to play a game, and I keep finding ways to close it accidentally. I want to make it so i can only close it through task manager.

Googling for “Processing setUndecorated” will return a ton of results. Or you could search this forum: