mettli / guichan

Automatically exported from code.google.com/p/guichan
Other
0 stars 0 forks source link

extra mouse clicks from inside ScrollArea #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a ScrollArea from a Container holding one Icon.
2. Register the same object as the mouseListener for the Icon and 
ScrollArea.
3. Count the mouse click events received from the Icon

What is the expected behaviour? What happens instead?

Clicking on the icon should create 1 click event (and possibly a second 
from the ScrollArea), instead it creates two both of which give the Icon as 
their source. 

What version of the product are you using? On what operating system? Which 
back-end (SDL/Allegro/OpenGL/other)?

GUIchan 0.8.1, windows vista, SDL

Please provide any additional information below.

I was only counting right mouse clicks though I'd be surprised if that 
mattered. 

Original issue reported on code.google.com by guyfollo...@gmail.com on 17 Sep 2008 at 1:59

GoogleCodeExporter commented 9 years ago
I don't think this is a bug as when you click the Icon the source will always 
be the
Icon, never the ScrollArea even if the event bubbles up from the Icon to the
ScrollArea. What you can do in the SVN version of Guichan is to check which 
widget
actually distributed the event, and that should be Icon for all Icon listeners 
and
ScrollArea for all ScrollArea listeners.

Also, you should get two events as you have registered your mouse listener on 
two
widgets.

Original comment by olof.nae...@gmail.com on 17 Sep 2008 at 3:31