mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
io/pointer: delete Foremost priority
It wasn't used, and it's not clear that it is useful at all in its current form. For example, a single control with multiple handler keys (say, one for scrolling and one for clicking) will only receive priority Foremost for one of them. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -236,14 +236,11 @@ func (q *pointerQueue) Push(e pointer.Event, events *handlerEvents) {
|
||||
if e.Type == pointer.Release {
|
||||
q.pointers = append(q.pointers[:pidx], q.pointers[pidx+1:]...)
|
||||
}
|
||||
for i, k := range p.handlers {
|
||||
for _, k := range p.handlers {
|
||||
h := q.handlers[k]
|
||||
e := e
|
||||
switch {
|
||||
case p.pressed && len(p.handlers) == 1:
|
||||
if p.pressed && len(p.handlers) == 1 {
|
||||
e.Priority = pointer.Grabbed
|
||||
case i == 0:
|
||||
e.Priority = pointer.Foremost
|
||||
}
|
||||
e.Hit = q.hit(h.area, e.Position)
|
||||
e.Position = h.transform.Invert().Transform(e.Position)
|
||||
|
||||
Reference in New Issue
Block a user