I originally started with this, because currently the boundbox
rectangle for the markers region is static, so that the pointer
can be passed along safely.
This does not work anymore, when we move the marker area to the top.
(think about the case when there are two marker area in separate areas).
There are multiple possible solutions.
I need some feedback to decide which way to go.
- Allocate a new rectangle for the event handler and free it, when the handler is freed. This also requires one or two new booleans in the wmEventHandler struct. Those store whether the rectangle has to be freed.
- Store the rectangles in the event handler by value. I'm not 100% if this actually works, or if it is important, that the rectangle memory is shared e.g. with some &ar->v2d.mask.
- Implement a more generic poll mechanism for event handlers. For that I'd store some function pointer and user_data in the event handler struct. Not sure if something like this could be useful for other things in Blender.