Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 421
Daniel George Avatar asked Mar 11 '26 12:03

Daniel George


1 Answers

Ok. I figured this one out. The problem went away when I called the tkinter functions from a key press, not a mouse press.

like image 186
Daniel George Avatar answered Mar 14 '26 00:03

Daniel George



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!