cursive
cursive copied to clipboard
Improve `View::take_focus` behaviour with mouse events.
When take_focus
is caused by a mouse event, source = Direction::none()
may not be enough to decide whether to take the focus or now.
Example: a LinearLayout
with two children, only one of them focusable. If a mouse click falls on the non-focusable child, should the LinearLayout take focus? And transmit it to the other, focusable child?
One solution for that is to add a new type of absolute direction: maybe Absolute::Target(Vec2)
, used for focus caused by mouse events. Or maybe give Absolute::None
an Option<Vec2>
target?