[gtk/wip/matthiasc/popup5] surface: Avoid autodismissal on button release



commit 689711044efd0ce75ca7888eac027539e1535cad
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 8dca4d32b3..df949bc789 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4011,7 +4011,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]