I'm writing this because, out of nowhere, my pygame program has started acting up. I'm no stranger to pygame and I'd say I know it better than most. I've been using it for years and out of nowhere this bug, or whatever it is, has me stumped.
The problem: Upon pressing the minimize button the screen (that is to say, the pygame.display object) goes completely blank (grey). It won't display anything until an update is called, and when that update is called it well redraw everything that was previously on it- however it will draw a transparent blue rectangle over everything.
My screen looks like this upon boot up:
After minimizing and restoring, it looks like this:
After the next update is called, I get this:
What makes this a true headscratcher though is this. I figured it was about time for an update anyway, so I wiped my drive reinstalled my entire OS, before putting in a fresh install of python(3.7 from 3.5) and pygame(1.9.2 from something less). So this system is out-of-the-box mint.
I've been using pygame for years now. I know I can code my way around this (probably by just drawing everything from prior to the minimization) but that is going to add more complexity and overhead than I'm willing to offer- esspecially since there is obviously something broken happening.
import pygame, sys
pygame.init()
Screen = pygame.display.set_mode( ( 1200, 700 ), pygame.RESIZABLE, 32 )
pygame.draw.circle( Screen, ( 200, 200, 200 ), ( 600, 350 ), 300, 0 )
pygame.display.update()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT: pygame.quit()
pygame.display.update()