gdksurface: Do not consider GDK_TOUCH_END/CANCEL as popup-dismiss worthy
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 18 Nov 2022 14:02:22 +0000 (15:02 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 18 Nov 2022 16:56:14 +0000 (17:56 +0100)
commitf1168c50128141cebd9237fb04eb893ab18c2355
tree7ba2da5fe93c641e71190eae1eb8b327c9415561
parentae54374a514aa33b34f95eee94b4a2848b8a16d9
gdksurface: Do not consider GDK_TOUCH_END/CANCEL as popup-dismiss worthy

GDK_TOUCH_END deserves the same treatment than GDK_BUTTON_RELEASE, since it's
subject to the same circumstances (popping up a menu on long press would be
immediately dismissed on release if we handled them there). Ideally, we would
want to match releases that we obtained a press for while grabbed, but as
the popup is also dismissed on GDK_BUTTON_PRESS/GDK_TOUCH_BEGIN, there's no
use for this tracking.

And GDK_TOUCH_CANCEL sounds weird as a reason to dismiss popups, just like
crossing events would.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2512
gdk/gdksurface.c