Signed-off-by: Peter Hutterer <[email protected]>
---
 tools/libinput-quirks.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/libinput-quirks.c b/tools/libinput-quirks.c
index 88c860e4..862bb0ae 100644
--- a/tools/libinput-quirks.c
+++ b/tools/libinput-quirks.c
@@ -162,8 +162,16 @@ main(int argc, char **argv)
 
        /* Overriding the data dir means no custom override file */
        if (!data_path) {
-               data_path = LIBINPUT_DATA_DIR;
-               override_file = LIBINPUT_DATA_OVERRIDE_FILE;
+               char *builddir;
+
+               builddir = tools_execdir_is_builddir();
+               if (builddir) {
+                       data_path = LIBINPUT_DATA_SRCDIR;
+                       free(builddir);
+               } else {
+                       data_path = LIBINPUT_DATA_DIR;
+                       override_file = LIBINPUT_DATA_OVERRIDE_FILE;
+               }
        }
 
        quirks = quirks_init_subsystem(data_path,
-- 
2.17.1

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to