toytoolkit: match parent surface type when adding a subsurface
When adding a subsurface (to display a tooltip) in toytoolkit,
we now get the parent window surface type (SHM or EGL) and
define the new surface type as the same.
This fixes crashes with tooltips in cases like having
Cairo-EGL available but running the X11 compositor.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
diff --git a/clients/window.h b/clients/window.h
index 0a113fc..ae3af40 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -364,6 +364,9 @@
void
window_set_buffer_type(struct window *window, enum window_buffer_type type);
+enum window_buffer_type
+window_get_buffer_type(struct window *window);
+
int
window_is_fullscreen(struct window *window);