backend: gdk: add support for foreign windows on wayland

https://bugzilla.gnome.org/show_bug.cgi?id=734935
This commit is contained in:
Lionel Landwerlin 2014-08-16 20:35:54 +01:00
parent ccd2054fda
commit ad18f2a996

View File

@ -32,6 +32,9 @@
#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
@ -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))
{