[clutter] gdk: Support GdkWayland
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gdk: Support GdkWayland
- Date: Mon, 12 Jan 2015 17:49:05 +0000 (UTC)
commit 8859ed44e176656a54f7d75270e4ac3b498eaeae
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jan 12 17:48:04 2015 +0000
gdk: Support GdkWayland
We need to set up the Wayland display when using GDK and Wayland's
client-side API.
clutter/gdk/clutter-backend-gdk.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
index 7f14feb..563f85f 100644
--- a/clutter/gdk/clutter-backend-gdk.c
+++ b/clutter/gdk/clutter-backend-gdk.c
@@ -45,10 +45,18 @@
#include <cogl/cogl-xlib.h>
#endif
+#if defined(GDK_WINDOWING_WAYLAND) && defined(COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
+#include <cogl/cogl-wayland-client.h>
+#endif
+
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
+#ifdef GDK_WINDOWING_WAYLAND
+#include <gdk/gdkwayland.h>
+#endif
+
#ifdef GDK_WINDOWING_WIN32
#include <gdk/gdkwin32.h>
#endif
@@ -275,6 +283,17 @@ clutter_backend_gdk_get_renderer (ClutterBackend *backend,
}
else
#endif
+#if defined(GDK_WINDOWING_WAYLAND) && defined(COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
+ if (GDK_IS_WAYLAND_DISPLAY (backend_gdk->display))
+ {
+ struct wl_display *display = gdk_wayland_display_get_wl_display (backend_gdk->display);
+
+ /* Force a Wayland winsys */
+ cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_EGL_WAYLAND);
+ cogl_wayland_renderer_set_foreign_display (renderer, display);
+ }
+ else
+#endif
#if defined(GDK_WINDOWING_WIN32)
if (GDK_IS_WIN32_DISPLAY (backend_gdk->display))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]