~eliasnaur/gio

1

Should gesture.Hover consider pointer.Cancel events similar to that of pointer.Leave ?

Details
Message ID
<CABydZCza8rwjyKJy34FbTgzWPAr=F6KRxP7W3PvgELJ2=6NNTw@mail.gmail.com>
DKIM signature
pass
Download raw message
While dragging a widget using gesture.Drag, which is also listening to
gesture.Hover events, the Hover handler loses out to the Drag handler
and receives a pointer.Cancel, but "func (h *Hover) Hovered(q
event.Queue) bool" continues to return true.

Unless I am using this incorrectly, in which case please educate me, I
believe that the pointer.Cancel event should be considered to have a
similar effect as that of pointer.Leave making  "func (h *Hover)
Hovered(q event.Queue) bool" return false.

See reproducer code below along with a screencast.

Reproducer Code:
https://paste.sr.ht/~rkanchan/9135fa0ccb5cc89383559cdad3a23deac6594849

Screencast: https://drive.google.com/file/d/1ZTaFl2jikRjAHQj9I7LYHE1Auj58QwXL/view?usp=sharing

Rajiv
Details
Message ID
<CHDRB2VEXW4P.1LYP5V82LVGTI@themachine>
In-Reply-To
<CABydZCza8rwjyKJy34FbTgzWPAr=F6KRxP7W3PvgELJ2=6NNTw@mail.gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
On Mon Jan 24, 2022 at 10:12, Rajiv Kanchan wrote:
> While dragging a widget using gesture.Drag, which is also listening to
> gesture.Hover events, the Hover handler loses out to the Drag handler
> and receives a pointer.Cancel, but "func (h *Hover) Hovered(q
> event.Queue) bool" continues to return true.
>
> Unless I am using this incorrectly, in which case please educate me, I
> believe that the pointer.Cancel event should be considered to have a
> similar effect as that of pointer.Leave making  "func (h *Hover)
> Hovered(q event.Queue) bool" return false.
>

You're absolutely correct. All gesture handlers, gesture.Hover included,
should handle pointer.Cancel. Please file an issue, or send us a patch
that fixes the problem.

Thank you,
Elias
Reply to thread Export thread (mbox)