Comment 13 for bug 365458

Revision history for this message
Alex Leone (acleone) wrote :

From inkscape-devel email on this bug:

> 1. What handles click events on the canvas
> 2. Where is the logic that decides what gets selected

The function that selects the object under the cursor is at
event-context.cpp:1079. Through some indirection it calls the
find_item_at_point at document.cpp:1197 and this in turn calls
nr_arena_item_invoke_pick at display/nr-arena-item.cpp:635 which calls
a GObject virtual function; for shapes it executes nr_arena_shape_pick
at display/nr-arena-shape.cpp:1078.

You need to insert the fix into find_item_at_point by also testing the
mask and clip, either using another call to nr_arena_shape_pick or
some other method. Note that while masks can be tested in the usual
way, for clippaths you need to treat them as filled and unstroked
regardless of their actual style. This requires adding an extra
parameter to the virtual functions.

Regards, Krzysztof