[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] another question~



black wrote:
> *and I have another question, dunno how to handle it, that it how to
> handle the event when pressing the quit button of pygame window. it
> often returns no response for me when I click quit buttton on its
> topright corner. thanx for any ideas~*

when something like this happens, it usually means the event queue is
getting filled up. SDL's event queue only holds about 250 elements. this
can get full pretty quick with a lot of MOUSEMOTION messages.

if you are using the code i mailed previously though, that should be a
problem, since pygame.event.wait() does remove the top event from the queue
when they happen. it should run plenty fast to keep the event queue close
to empty.

perhaps it would help to add a line "print event" after the event.wait()
line. then you can see each event and it's attributes as they happen. is
the QUIT event showing up?


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org