[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Display Update Trouble After Focus Loss
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Display Update Trouble After Focus Loss
- From: "Nathan Whitehead" <nwhitehe@xxxxxxxxx>
- Date: Thu, 11 Sep 2008 10:00:13 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 11 Sep 2008 13:00:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=q4Qq+v6Ju3R+cUHARMeMuKk6G+1BKdW2CoFJOJDFKuY=; b=YJF5fYqj/c0+RpWdhOxL5vTFBn3YJFblZAs64gkgwv82Qp9VaWoVpEw26AF+T73ty7 qMjpXmSJlaEDYPoJ+eIuRqpXuNSyrGgiI5VFKR5Q7JiNFRaJqUj8fySKJmQqG1Dx2rRi NNEQkdYQX0AUrQsyEGD2gpsGhoWKcoVscQptc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=m/UPZDqOml2iFaqai+B4NaQqs9hBp7YG6dFn/xMv84p5wKHuMRKAlDlEZsSZ8F3XWi g/S+zyRGVcsLCW2LwahQxKMFeaJdJonZqRr/84/DGEOD4DXcWvK6sUGpTZA4oxclWHru MqHYv1pR9hMmRstuTLdRhPtdVLaxx2waH2LAg=
- In-reply-to: <217c8c050809110845s21e0f693ofd8c8526ea4f9d2f@xxxxxxxxxxxxxx>
- References: <217c8c050809110845s21e0f693ofd8c8526ea4f9d2f@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On Thu, Sep 11, 2008 at 8:45 AM, Mark S <slygroups@xxxxxxxxx> wrote:
> I'm having some trouble with the pygame display. While my program is
> running it will spend a chunk of time continually animating in a tight loop.
> If during this time the window losses focus (I click on another window, for
> example) the display will stop updating. The program continues running and
> when it reaches the end of the animation loop it will wait for the user to
> hit a key, at which point the display with begin updating again.
I would try adding pygame.event.pump() calls within the tight
animation loop (once per frame maybe). That will allow pygame to
process windowing events during the animation.
--
Nathan Whitehead