gesture: fix Hover by handling pointer.Cancel event

pointer.Cancel event is ignored, resulting in Hovered returning true
even though the pointer is no longer hovering over the region.
This change fixes it.

Signed-off-by: Rajiv Kanchan <rajiivkanchan@gmail.com>
This commit is contained in:
Rajiv Kanchan
2022-01-24 19:08:20 +05:30
committed by Elias Naur
parent 2cf7c5b949
commit 29e6159d30
+1 -1
View File
@@ -51,7 +51,7 @@ func (h *Hover) Hovered(q event.Queue) bool {
continue
}
switch e.Type {
case pointer.Leave:
case pointer.Leave, pointer.Cancel:
if h.entered && h.pid == e.PointerID {
h.entered = false
}