mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
all: [API] replace tag parameter of Source.Event with per-filter tags
Until now, every event has had a particular target. We're about to simplify key event delivery to match the first matching filter, so there is no longer a global meaning to the tag argument to Source.Event. Add fields to filters to specify their target tags. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -294,6 +294,7 @@ func TestFocusScroll(t *testing.T) {
|
||||
filters := []event.Filter{
|
||||
key.FocusFilter{},
|
||||
pointer.Filter{
|
||||
Target: h,
|
||||
Kinds: pointer.Scroll,
|
||||
ScrollBounds: image.Rect(-100, -100, 100, 100),
|
||||
},
|
||||
@@ -322,7 +323,8 @@ func TestFocusClick(t *testing.T) {
|
||||
filters := []event.Filter{
|
||||
key.FocusFilter{},
|
||||
pointer.Filter{
|
||||
Kinds: pointer.Press | pointer.Release,
|
||||
Target: h,
|
||||
Kinds: pointer.Press | pointer.Release,
|
||||
},
|
||||
}
|
||||
assertEventPointerTypeSequence(t, events(r, h, filters...), pointer.Cancel)
|
||||
|
||||
Reference in New Issue
Block a user