diff --git a/main.go b/main.go index 2afa03b..f65b5a0 100644 --- a/main.go +++ b/main.go @@ -22,10 +22,9 @@ const ( ) type dragger struct { - events chan x.GenericEvent - startedDrag bool - start [2]int16 - end [2]int16 + events chan x.GenericEvent + start [2]int16 + end [2]int16 } // Watch begins the process of dragger watching for drag events @@ -50,11 +49,9 @@ func (s *dragger) watch() int { } if generic.GetEventCode() == Pressed { - s.startedDrag = true s.start = [2]int16{event.EventX, event.EventY} } else { s.end = [2]int16{event.EventX, event.EventY} - s.startedDrag = false return s.distance() } }