From ad18f2a996a685962016055734121d45be581b5c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sat, 16 Aug 2014 20:35:54 +0100 Subject: [PATCH] backend: gdk: add support for foreign windows on wayland https://bugzilla.gnome.org/show_bug.cgi?id=734935 --- clutter/gdk/clutter-stage-gdk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c index 06e240388..af12f49a2 100644 --- a/clutter/gdk/clutter-stage-gdk.c +++ b/clutter/gdk/clutter-stage-gdk.c @@ -32,6 +32,9 @@ #ifdef GDK_WINDOWING_X11 #include #endif +#ifdef GDK_WINDOWING_WAYLAND +#include +#endif #ifdef GDK_WINDOWING_WIN32 #include #endif @@ -270,6 +273,14 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window) } else #endif +#if defined(GDK_WINDOWING_WAYLAND) && defined(COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT) + if (GDK_IS_WAYLAND_WINDOW (stage_gdk->window)) + { + cogl_wayland_onscreen_set_foreign_surface (stage_cogl->onscreen, + gdk_wayland_window_get_wl_surface (stage_gdk->window)); + } + else +#endif #if defined(GDK_WINDOWING_WIN32) && defined(COGL_HAS_WIN32_SUPPORT) if (GDK_IS_WIN32_WINDOW (stage_gdk->window)) {