shell: Cancel popups when triggering screensaver

This is part of the fix for bug 72540.  We cancel the popup grab when the
screensaver kicks in so that the screen unlock dialog can get input events.
The bigger problem is in mesa however, where we try to allocate new buffers
as cairo-gles2 does a gratuituous (but valid) eglMakeCurrent() as we
remove the tooltip or popup-menu.

Since we removed the weston_layer with the regular surfaces, EGL blocks
waiting for a frame event that never comes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72540
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index e3ef66f..408026f 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4492,6 +4492,11 @@
 {
 	struct desktop_shell *shell =
 		container_of(listener, struct desktop_shell, idle_listener);
+	struct weston_seat *seat;
+
+	wl_list_for_each(seat, &shell->compositor->seat_list, link)
+		if (seat->pointer)
+			popup_grab_end(seat->pointer);
 
 	shell_fade(shell, FADE_OUT);
 	/* lock() is called from shell_fade_done() */