[gtk/wip/matthiasc/popup5: 120/139] surface: Avoid autodismissal on button release
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 120/139] surface: Avoid autodismissal on button release
- Date: Sun, 5 May 2019 22:19:24 +0000 (UTC)
commit cec31d2ce81a75b4480bee017a7afb4aaba1e175
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Apr 30 01:45:37 2019 +0000
surface: Avoid autodismissal on button release
At least under X, implicit grabs guarantee
that the release goes to the same surface
as the press, which is bad news if we show
an autodismiss surface in response to it.
Until we have a proper solution, just
ignore button release events for autodismissal.
gdk/gdksurface.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 2013812211..b65af21e26 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4023,7 +4023,13 @@ check_auto_dismissal (GdkEvent *event)
switch ((guint) gdk_event_get_event_type (event))
{
case GDK_BUTTON_PRESS:
+#if 0
+ // FIXME: we need to ignore the release that is paired
+ // with the press starting the grab - due to implicit
+ // grabs, it will be delivered to the same place as the
+ // press, and will cause the auto dismissal to be triggered.
case GDK_BUTTON_RELEASE:
+#endif
case GDK_TOUCH_BEGIN:
case GDK_TOUCH_END:
case GDK_TOUCH_CANCEL:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]