build: only compile plug/socket when available

Plug and Socket require X11 windowing. Often times this is compiled
on systems with both wayland and x11, but not always. Quartz is an
example where it is usually not compiled.
This commit is contained in:
Christian Hergert 2015-09-04 14:06:22 -07:00 committed by Ignacio Casal Quinteiro
parent f7e0deb7cb
commit 5bb9c1891c

View File

@ -417,11 +417,10 @@ test_type (gconstpointer data)
/* Backend-specific */ /* Backend-specific */
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) ; if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) ;
else else if (g_type_is_a (type, GTK_TYPE_PLUG) ||
#endif g_type_is_a (type, GTK_TYPE_SOCKET))
if (g_type_is_a (type, GTK_TYPE_PLUG) ||
g_type_is_a (type, GTK_TYPE_SOCKET))
return; return;
#endif
#ifdef GDK_WINDOWING_WAYLAND #ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))