shell: handle multiple popups
This patch implements a popup stack. When the first popup is opened
the grab is started, and it is added to a list. Further popups will
be added to this list but the grab won't change. When a popup is
closed it is removed from the list and, if it is now empty, the grab
is ended.
A click outside the client area will send the popup_done event to
all the popups in the list, and the grab will end.
diff --git a/src/compositor.h b/src/compositor.h
index 58ab58d..4cc24d8 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -227,6 +227,7 @@
int has_keyboard;
struct wl_touch touch;
int has_touch;
+ struct wl_signal destroy_signal;
struct weston_compositor *compositor;
struct weston_surface *sprite;