io/pointer,gesture: report right and middle mouse button events

Updates gio#60

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-09 16:34:00 +01:00
parent a0050ab79b
commit dc7f9bab23
10 changed files with 160 additions and 36 deletions
+3
View File
@@ -128,6 +128,9 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
if c.state == StatePressed || !e.Hit {
break
}
if e.Source == pointer.Mouse && e.Buttons != pointer.ButtonLeft {
break
}
c.state = StatePressed
events = append(events, ClickEvent{Type: TypePress, Position: e.Position, Source: e.Source})
case pointer.Move: