# The gameloop is stucking the window

I tried to display a player image in a 800x600 window using PyGame but when I try it, the window just gets stuck (immovable with mouse drag, minimize,maximize and close button is stuck and not clickable).

I have no Idea for the reason.

Here's the code:

from pygame.locals import *
pygame.init()

fps = pygame.time.Clock()

WINDOW_SIZE = (800, 600)
pygame.display.set_caption("Game")
screen = pygame.display.set_mode(WINDOW_SIZE, 0, 0)

location = [0,0]

while True:

screen.blit(player_image, location)

pygame.display.update()
fps.tick(60)

pygame.quit()


You need to handle events regularly. Usually that is calling pygame.event.get(). For example:
while not done:

If you are doing nothing with the events, you can call pygame.event.pump() instead.