'Pygame window wont move or close after using tkinter

I have had this problem for ages now with many different projects now, so I really want to find out how to fix it. For example, in one of my projects, I created a level editor for a game. The level editor had the option to save and load different levels from a file using tkinter.filedialog.

Now after I select the file, the game will still work, but the 'X' close button doesn't work anymore, and I can't move the window.

The game itself works as usual, and I can still interact with everything inside of the window, but I can't move or close the window.

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source