forked from joejulian/gio
io/router: simplify pointer event routing
- Drop pointer.Event.Hit in favour of Enter/Leave events. - Track enter/leaves for each pointer.ID (updates #122). Add test. - Resolve grabs once. - Get rid of scratch slice. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -145,7 +145,7 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
|
||||
case pointer.Cancel:
|
||||
c.state = StateNormal
|
||||
case pointer.Press:
|
||||
if c.state == StatePressed || !e.Hit {
|
||||
if c.state == StatePressed {
|
||||
break
|
||||
}
|
||||
if e.Source == pointer.Mouse && e.Buttons != pointer.ButtonLeft {
|
||||
|
||||
Reference in New Issue
Block a user