diff --git a/plugins/linux-capture/xshm-input.c b/plugins/linux-capture/xshm-input.c
index 6cd305278..9ef7a77db 100644
--- a/plugins/linux-capture/xshm-input.c
+++ b/plugins/linux-capture/xshm-input.c
@@ -20,6 +20,9 @@ along with this program. If not, see .
#include
#include
#include
+#include
+#include
+#include
#include
#include
@@ -74,6 +77,24 @@ static inline void xshm_resize_texture(struct xshm_data *data)
GS_BGRA, 1, NULL, GS_DYNAMIC);
}
+/**
+ * Check if the xserver supports all the extensions we need
+ */
+static bool xshm_check_extensions(xcb_connection_t *xcb)
+{
+ bool ok = true;
+
+ if (!xcb_get_extension_data(xcb, &xcb_shm_id)->present) {
+ blog(LOG_ERROR, "Missing SHM extension !");
+ ok = false;
+ }
+
+ if (!xcb_get_extension_data(xcb, &xcb_xinerama_id)->present)
+ blog(LOG_INFO, "Missing Xinerama extension !");
+
+ return ok;
+}
+
/**
* Update the capture
*