[Python] Problem with Pygame window not spawning at the top left of the screen [duplicate]

Discussão em 'Python' iniciado por Stack, Julho 30, 2025.

  1. Stack

    Stack Membro Participativo

    import pgzrun
    import random
    import pygame
    import os
    pygame.init()
    os.environ['SDL_VIDEO_WINDOW_POS'] = '0,0'

    WIDTH = 1200 HEIGHT = 900`


    Program does not spawn at 0,0 of the screen, instead a random location somewhere in the bottom right of my screen.

    I was expecting it to spawn at the top left but it didn't work.

    Continue reading...

Compartilhe esta Página