diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-08-24 16:56:36 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-08-24 17:04:18 +0200 |
commit | 6051dd76ac5e1738e00cbb677aeadea32e3df3be (patch) | |
tree | db54d8a812b2da3bc50cca445e55a9bed198419a /src/totem-object.c | |
parent | 4c708c64002289881c9aa9376a9831a9a99fc869 (diff) | |
download | totem-6051dd76ac5e1738e00cbb677aeadea32e3df3be.tar.gz |
main: Bring back video inside the window under Wayland
Working around the lack of subsurface support in clutter's GDK backend
by forcing the wayland backend when GTK+ uses the Wayland backend.
See https://bugzilla.gnome.org/show_bug.cgi?id=752143
Diffstat (limited to 'src/totem-object.c')
-rw-r--r-- | src/totem-object.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/totem-object.c b/src/totem-object.c index d04d93bf2..8f540bf52 100644 --- a/src/totem-object.c +++ b/src/totem-object.c @@ -68,6 +68,10 @@ #include "totem-mime-types.h" #include "totem-uri-schemes.h" +#ifdef GDK_WINDOWING_WAYLAND +#include <gdk/gdkwayland.h> +#endif /* GDK_WINDOWING_WAYLAND */ + #define REWIND_OR_PREVIOUS 4000 #define SEEK_FORWARD_SHORT_OFFSET 15 @@ -501,6 +505,22 @@ totem_object_init (TotemObject *totem) { GtkSettings *gtk_settings; + gtk_init (NULL, NULL); + +#ifdef GDK_WINDOWING_WAYLAND + /* Work-around lack of sub-surface support in Clutter's + * GDK backend: + * https://bugzilla.gnome.org/show_bug.cgi?id=752143 + * Also remove the include when that's fixed */ + { + GdkDisplay *display; + + display = gdk_display_get_default (); + if (GDK_IS_WAYLAND_DISPLAY (display)) + g_setenv ("CLUTTER_BACKEND", "wayland", TRUE); + } +#endif + if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) g_warning ("gtk-clutter failed to initialise, expect problems from here on."); |