Using: pygame 2.5.2 (SDL 2.28.2, Python 3.10.12) on Ubuntu 22.04.4 LTS
My pygame app, which is running with the .set_mode
flags FULLSCREEN
and NOFRAME
, is updating the screen via pygame.display,update(rect_list)
.After moving the app into the background and getting it back in front the screen isn't updated anymore.
Using pygame.display,update()
or pygame.display.flip()
will keep the updates running.
This behaviour is not showing without the above posted flags.
Runnnig the same code on a RaspberryPI isn't showing this behaviour
Is this behaviour known/correct?
Sample code showing the above behaviour:
import pygamefrom pygame.locals import ( K_ESCAPE, QUIT, KEYDOWN, MOUSEBUTTONDOWN, NOFRAME, FULLSCREEN)pygame.init()pygame.font.init()pygame.event.set_allowed([QUIT, KEYDOWN,MOUSEBUTTONDOWN])flags = NOFRAME | FULLSCREENscreen = pygame.display.set_mode((0,0),flags) pygame.mouse.set_visible(False)....blit_Sequence=[]blit_Sequence.extend(((scopeA, (scopeLeft,scopeATop)),(scopeB, (scopeLeft,scopeBTop))))....#some code to do intial drawingspygame.display.flip() #display the initial screen contents#The GameLoop starts here!while running: #some drawings on the scopeA and scopeB like: nextX = nextX +1 scopeA.fill((13,11,0), special_flags=pygame.BLEND_RGB_SUB) scopeB.blit(secScope,(nextX,0),((nextX,0),(nextWidth+1,scopeHeight))) ..... scopeRect=screen.blits(blit_Sequence,1) scopeRect.extend((scopeLabelA_rect,scopeLabelB_rect)) pygame.display.update(scopeRect)pygame.quit()