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);