examples: force gtk to x11 backend

Until someone makes it work with the wayland backend.
The code currenty assumes and hard-codes X11.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/49
This commit is contained in:
Tim-Philipp Müller 2018-10-08 23:47:51 +01:00
parent 347d732889
commit 18e4e80b7d
2 changed files with 8 additions and 0 deletions

View file

@ -299,6 +299,10 @@ main (int argc, char *argv[])
GError *error = NULL;
GstBus *bus;
/* FIXME: add support for Gdk Wayland backend, code currently assumes X11 */
if (g_getenv ("GDK_BACKEND") == NULL)
g_setenv ("GDK_BACKEND", "x11", TRUE);
gst_init (&argc, &argv);
gtk_init (&argc, &argv);

View file

@ -520,6 +520,10 @@ main (int argc, char *argv[])
GError *error = NULL;
int i;
/* FIXME: add support for Gdk Wayland backend, code currently assumes X11 */
if (g_getenv ("GDK_BACKEND") == NULL)
g_setenv ("GDK_BACKEND", "x11", TRUE);
gtk_init (&argc, &argv);
gst_init (&argc, &argv);