io/pointer,io/router: [API] make pass-through a property of AreaOp

We're about to make operation scopes explicit, which would result in
both AreaOp and PassOp be scoped. However, PassOp seems to light to have
its separate stack, so this change instead makes pass-through a property
of an area. We're assuming that clients that want pass-through are also
aware of the affected hit area.

API change: replace PassOps with the AreaOp.PassThrough field.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-03 18:23:55 +02:00
parent 62daadb37c
commit 6f80b94b4a
6 changed files with 51 additions and 56 deletions
+8 -5
View File
@@ -65,14 +65,17 @@ When determining which handlers match an Event, only handlers whose
areas contain the event position are considered. The matching
proceeds as follows.
First, the foremost matching handler is included. If the handler
has pass-through enabled, this step is repeated.
First, the foremost area that contains the event is found. If no such area
exists, matching stops.
Then, all matching handlers from the current node and all parent
nodes are included.
Then, every handler attached to the area or an area in the area stack is
matched with the event.
Third, If the area or any area in the area stack has pass-through enabled,
the matching repeats with the next foremost area.
In the example above, all events will go to h2 only even though both
handlers have the same area (the entire screen).
handlers have the same area (the implicit area that fills the window).
Pass-through