[SDL] Question about ignoring mouse events

Román Gorojovsky rgorojovsky at gmail.com
Tue Nov 15 09:55:51 PST 2005

[Sorry if I'm posting this a second time.  The first try got bounced
because I wasn't suscribed so I'm trying again.]

Hi all!!

This is probably a newbie question, so you can answer it with links
and/or pointers do the manuals.  I couldn't find anything mainly
because my english is not very good, so I don't know exactly what to
google for.

I'm writing a small SDL program to display the Mandelbrot Set.  I'm
implementing a zoom function.  The idea is to mark a rectangle with
the mouse and zooming to that area.  I catch the MOUSEBUTTONDOWN and
MOUSEBUTTONUP and set the rectangle's corners to the points marked.
Then I redraw the screen.

So far so good.

The problem is that when I press the mouse's button it doesn't
generate *one* event but many.  So when the program finishes
redrawing, it starts to zoom in again... and again......

I tried using

and using

as I found here

but I still have the same problem.

So my questions are: ¿How do I do this? and ¿Am I designing wrong this
zoom function?


More information about the SDL mailing list