[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Not getting mouse up event
ahhhh. Thanks. That explains a lot that I didn't understand about the event
queue. I had thought that the event queue was reset every tick, when in fact, I
was just consuming every item on it.
On Mon Nov 29 8:15 , Sami Hangaslammi <email@example.com> sent:
>On Mon, 29 Nov 2004 08:33:54 +0000, Austin Haas firstname.lastname@example.org> wrote:
>> I tried 'pump,' but it didn't help. I don't totally understand 'pump,' but
>> what I gather from the documentation is that, so long as you are making a
>> call to 'event' every tick, then you don't need it.
>> I am using Gentoo Linux and Pygame 1.6.1.
>> Also, the code I submitted was new, right before I mailed it, and I found that
>> it was also causing the input to frequently lock up. The game would be
>> running, but after a few seconds, all input, including clicking on the 'x' in
>> the window, would be disabled. I can't understand why.
>The problem in the code you originally posted is probably that the
>event queue is getting full since you only grab certain events out of
>it (probably from MOUSEMOVE events). Use event.set_blocked to filter
>out the events that you don't need and just call event.get(). Not sure
>if this will affect the MOUSEUP problem in your revised code, though.