From a117b16f400d20b95f722ae6cd43a548a834dcdb Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 12 Mar 2013 15:13:15 +0100 Subject: gdk-clutter-util: Add Wayland support to init Pretty useless, but gets the code running a little bit further. https://bugzilla.gnome.org/show_bug.cgi?id=695737 --- clutter-gtk/gtk-clutter-util.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/clutter-gtk/gtk-clutter-util.c b/clutter-gtk/gtk-clutter-util.c index db3ff09..1a3b398 100644 --- a/clutter-gtk/gtk-clutter-util.c +++ b/clutter-gtk/gtk-clutter-util.c @@ -23,6 +23,10 @@ #include #endif +#if defined(CLUTTER_WINDOWING_WAYLAND) +#include +#endif + #if defined(GDK_WINDOWING_X11) #include #endif @@ -31,6 +35,10 @@ #include #endif +#if defined(GDK_WINDOWING_WAYLAND) +#include +#endif + /** * SECTION:gtk-clutter-util * @Title: Utility Functions @@ -90,6 +98,17 @@ gtk_clutter_init_internal (void) clutter_win32_disable_event_retrieval (); } else +#endif +#if defined(GDK_WINDOWING_WAYLAND) && defined(CLUTTER_WINDOWING_WAYLAND) + if (clutter_check_windowing_backend (CLUTTER_WINDOWING_WAYLAND) && + GDK_IS_WAYLAND_DISPLAY (display)) + { + /* let GTK+ be in charge of the event handling */ + clutter_wayland_disable_event_retrieval (); + + clutter_wayland_set_display (gdk_wayland_display_get_wl_display (display)); + } + else #endif g_error ("*** Unsupported backend."); -- cgit v1.2.1