[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Not getting mouse up event



On Mon, 29 Nov 2004 08:33:54 +0000, Austin Haas <pygame@slippypeople.com> 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.

-- 
Sami Hangaslammi