diff --git a/src/backend/meson.build b/src/backend/meson.build index 2ac155636..67f3c636f 100644 --- a/src/backend/meson.build +++ b/src/backend/meson.build @@ -100,7 +100,7 @@ executable( backend_test, backend_test + '.c', include_directories: libbacon_video_widget_incs, - dependencies: [libbacon_video_widget_dep], + dependencies: [libbacon_video_widget_dep, x11_dep], c_args: libbacon_video_widget_cflags + [ '-DG_LOG_DOMAIN="@0@"'.format(backend_test) ] diff --git a/src/meson.build b/src/meson.build index ca2286093..7f50b3e34 100644 --- a/src/meson.build +++ b/src/meson.build @@ -186,7 +186,7 @@ totem = executable( meson.project_name(), 'totem.c', include_directories: totem_common_incs, - dependencies: [ libtotem_dep ], + dependencies: [ libtotem_dep, x11_dep ], c_args: totem_common_cflags + [ '-DG_LOG_DOMAIN="Totem"' ], diff --git a/src/totem.c b/src/totem.c index 46fed4505..3794f5497 100644 --- a/src/totem.c +++ b/src/totem.c @@ -35,6 +35,11 @@ #include #include +#ifdef GDK_WINDOWING_X11 +/* X11 headers */ +#include +#endif + #include "totem.h" int @@ -47,6 +52,11 @@ main (int argc, char **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#ifdef GDK_WINDOWING_X11 + if (XInitThreads () == 0) + g_error ("XInitThreads() failed, OS is broken. Contact your provider for support."); +#endif + g_set_prgname ("totem"); #if DEVELOPMENT_VERSION g_set_application_name (_("Videos Preview"));