diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-11-03 15:26:47 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-11-04 14:56:30 -0500 |
commit | 75f96b83de6ab547220b1ce2cbaf03087f365412 (patch) | |
tree | 16965e1a99aa1f7fbc29ce985be4c321ab9d5b00 | |
parent | 23c425618e96581db6f5a3ba72bedc93d0a3da9d (diff) | |
download | gtk+-75f96b83de6ab547220b1ce2cbaf03087f365412.tar.gz |
surface: Be more lenient for autohide
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
-rw-r--r-- | gdk/gdksurface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index f28c6ac4d1..00990ea40e 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2695,7 +2695,10 @@ check_autohide (GdkEvent *event) device = gdk_event_get_device (event); if (gdk_device_grab_info (display, device, &grab_surface, NULL)) { - if (grab_surface != gdk_event_get_surface (event) && + GdkSurface *event_surface = gdk_event_get_surface (event); + + if (grab_surface != event_surface && + grab_surface != event_surface->parent && grab_surface->autohide) { hide_popup_chain (grab_surface); |