In a pygame application window, the minimize, resize and close buttons are present. Is there a way to disable the close(X) button?
I don't think there is, because some window managers don't give you the ability to remove the close button. But you can write an event handler such that the close button does whatever you want, including nothing.
Why do you want to prevent the user from closing? If it's just a matter that you would rather provide an in-game "quit" button that confirms and/or saves before quitting, you can perform the same task when the user hits the close button.
how to disable the window close button in pygame?