lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
530 stars 190 forks source link

Game window after changed to fullscreen and windowed again #233

Closed Redysz closed 2 years ago

Redysz commented 3 years ago

If I make game size fullscreen and then I again change to windowed, I won't have opportunity to move the window of a game.

A piece of code:

WIDTH = 800
HEIGHT = 600

FULLSCREEN = False
def on_key_down(key):
    global FULLSCREEN
    if key == keys.F:
        if FULLSCREEN:
            screen.surface = pygame.display.set_mode((WIDTH, HEIGHT), pygame.RESIZABLE)
        else:
            screen.surface = pygame.display.set_mode((1920, 1080), pygame.FULLSCREEN)
        FULLSCREEN = not FULLSCREEN

Then my game window is on top and left and I can't change it image

fajnydev commented 3 years ago

I have the same issue +1

fillwithjoy1 commented 3 years ago

@lordmauve Yep I've got this issue too

lordmauve commented 2 years ago

Does this still happen under PyGame 2.1.2?

lordmauve commented 2 years ago

This was fixed in Pygame 2.0.2: https://github.com/pygame/pygame/pull/2460

fillwithjoy1 commented 2 years ago

Does this still happen under PyGame 2.1.2

I haven’t used pgzero ever since my school assessment