diff --git a/meson.build b/meson.build index 02fc495..4a93795 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,8 @@ x11 = dependency('x11') greeter_deps = [dbus_glib, gtk3, webkit2, x11] webext_deps = [webkit2_webext, libldm_gobject] +has_webkitgtk_214 = webkit2.version().version_compare('>=2.14.0') + # =================================== # # ------->>> Configuration <<<------- # @@ -57,6 +59,8 @@ conf.set('DESKTOP_DIR', '"@0@"'.format(get_option('with-desktop-dir'))) conf.set('WEBEXT_DIR', '"@0@"'.format(get_option('with-webext-dir'))) +conf.set('HAS_WEBKITGTK_2_14', has_webkitgtk_214) + # ===================================== # # ------->>> Sub Directories <<<------- # diff --git a/src/greeter.c b/src/greeter.c index bd9bd4c..a8f751d 100644 --- a/src/greeter.c +++ b/src/greeter.c @@ -106,7 +106,9 @@ create_new_webkit_settings_object(void) { "javascript-can-open-windows-automatically", TRUE, "allow-file-access-from-file-urls", TRUE, "enable-write-console-messages-to-stdout", TRUE, + #ifdef HAS_WEBKITGTK_2_14 "allow-universal-access-from-file-urls", TRUE, + #endif NULL ); }