ui/pointer: simplify pointer pass through

Get rid of the confused LayerOp and the transparent property from
AreaOp. Add an explicit PassOp to specify whether pointer events
pass-through the current area.

Let AreaOp swallow events even when no handlers are active for the
area. That behaviour is less surprising and allow clients to disable
a widget by keeping its areas but leave out its handlers.

Simplify the pointer.HitResult enum to just a bool: hit or no hit.

Finally, simplify the pointer queue by tracking parent areas and
node with indices.
This commit is contained in:
Elias Naur
2019-07-10 22:34:24 +02:00
parent f90ef91b19
commit f44ccec043
7 changed files with 103 additions and 129 deletions
-1
View File
@@ -91,7 +91,6 @@ func (l *List) Next() (int, Constraints, bool) {
if ok {
cs = axisConstraints(l.Axis, Constraint{Max: ui.Inf}, l.crossConstraintChild(l.cs))
l.ops.Begin()
ui.LayerOp{}.Add(l.ops)
}
return i, cs, ok
}