Policy: Consumption of raw and generated mouse events

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Mistaril
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Wed Jan 12, 2005 12:06
Location: Helsinki, Finland
Contact:

Policy: Consumption of raw and generated mouse events

Postby Mistaril » Tue Oct 26, 2004 06:12

Here is the scenario (indentation used to signify nested calls):

Code: Select all

1. mouseDown injected into System
2. mouseUpInjected into System
3.  MouseButtonUp Event generated
4.   handler consumes MouseButtonUp
5.  Timer checked, MouseClick Event generated
6.   -> MouseClick not consumed
7. -> System returns event not consumed


Ie. Even if the event handler consumed the raw event, System indicates that the event wasn't consumed. Is this by purpose and if yes, what is the reasoning? :)
Kai Backman, programmer
ShortHike.com, Space Settlement Simulation Guild

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Policy: Consumption of raw and generated mouse events

Postby CrazyEddie » Tue Oct 26, 2004 10:07

This is, I think, a bug :)

I'll address this later today if I get time. One remaining question is, should consuming a Click event also cause the mouse button up event that triggered the click to also be consumed? I would think this should not be the case, so will apply the fix to give this behaviour.

Thanks for letting me know about this :)

CE.

User avatar
Mistaril
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Wed Jan 12, 2005 12:06
Location: Helsinki, Finland
Contact:

Policy: Consumption of raw and generated mouse events

Postby Mistaril » Wed Oct 27, 2004 07:54

This is, I think, a bug :)

I'll address this later today if I get time. One remaining question is, should consuming a Click event also cause the mouse button up event that triggered the click to also be consumed? I would think this should not be the case, so will apply the fix to give this behaviour.


IMHO, if the click is consumed, the original mouse button event should also be consumed. Otherwise there is no way for the GUI to communicate that the click has been used somehow (as the application is only feeding in raw events).

So the original event is consumed if the raw event OR any derivative events are consumed.
Kai Backman, programmer

ShortHike.com, Space Settlement Simulation Guild

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Policy: Consumption of raw and generated mouse events

Postby CrazyEddie » Wed Oct 27, 2004 09:15

Hmmm. Decisions, decisions :D

I think you're probably right about this...

CE.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests