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



commit 9649d5402e2aa3c37b2abb7e3199a2f6e8ee076a
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]