From 2d9e5a8720e4b9b53caf50539fa252b42ef5f831 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sat, 1 Oct 2016 21:09:19 -0500 Subject: [PATCH] maintain backwards compatibility with versions of webkitgtk less than 2.14 --- meson.build | 4 ++++ src/greeter.c | 2 ++ 2 files changed, 6 insertions(+) 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 ); }