gesturemultipress: Don’t fire ::released after ::cancel
authorErnestas Kulik <ernestask@gnome.org>
Tue, 29 May 2018 11:43:06 +0000 (14:43 +0300)
committerErnestas Kulik <ernestask@gnome.org>
Tue, 29 May 2018 16:09:28 +0000 (19:09 +0300)
commit4d2b39d98c3f392782e0ae205dfb50cbc1052b3d
tree652210b3cdb5dedf416726cd6bb7494f7e703ee6
parente9765c0405e0c83585eb2c13c09ddeba12faa599
gesturemultipress: Don’t fire ::released after ::cancel

Causing a grab in the handler for ::pressed by, e.g., popping up a
context menu will cause the gesture to be canceled and, subsequently,
::end and ::released to be fired, all while the button is still
physically pressed. That results in no event being available to the
::released handler and garbage coordinates, given that
gtk_gesture_get_point() returns FALSE.

Emitting ::released can be avoided by checking the return value
gtk_gesture_get_point().
gtk/gtkgesturemultipress.c