When I make my window smaller by dragging and dropping the top left corner to the direction of the bottom right corner, the window automatically resizes to the given minimum dimensions if its too small. The Problem is, the way its resizing. It expands to the bottom and to the right so if I make it too small it resizes itself and is not in the same position as before. How can I fix this ?
This is my videoresize event:
if event.type == pg.VIDEORESIZE:
new_w, new_h = event.dict['size']
if new_w < 900:
new_w = 900
if new_h < 600:
new_h = 600
SCREEN = pg.display.set_mode((new_w, new_h), pg.RESIZABLE)