mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
gdk: Support GdkWayland
We need to set up the Wayland display when using GDK and Wayland's client-side API.
This commit is contained in:
parent
00efa5371d
commit
8859ed44e1
@ -45,10 +45,18 @@
|
|||||||
#include <cogl/cogl-xlib.h>
|
#include <cogl/cogl-xlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GDK_WINDOWING_WAYLAND) && defined(COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
|
||||||
|
#include <cogl/cogl-wayland-client.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
|
#include <gdk/gdkwayland.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
#include <gdk/gdkwin32.h>
|
#include <gdk/gdkwin32.h>
|
||||||
#endif
|
#endif
|
||||||
@ -275,6 +283,17 @@ clutter_backend_gdk_get_renderer (ClutterBackend *backend,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#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 defined(GDK_WINDOWING_WIN32)
|
||||||
if (GDK_IS_WIN32_DISPLAY (backend_gdk->display))
|
if (GDK_IS_WIN32_DISPLAY (backend_gdk->display))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user