mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
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:
+8
-5
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user