aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRyan Farley <ryan.farley@gmx.com>2021-04-07 13:10:43 -0500
committerSimon Ser <contact@emersion.fr>2021-04-11 19:09:36 +0200
commitb29ac8fbaceeac7f902fc75bb94a13b9cd9a0465 (patch)
treea47bd9bb8d4265386c3abb5ad7be6a7a397bbfb0 /include
parent5a178c4a2398de612b7a4cb39d060ec62eec666b (diff)
util/uuid: replace with util/token, remove libuuid
Use 128-bit hexadecimal string tokens generated with /dev/urandom instead of UUIDs for xdg-foreign handles, removing the libuuid dependency. Update readme and CI. Closes #2830. build: remove xdg-foreign feature With no external dependencies required, there's no reason not to always build it. Remove WLR_HAS_XDG_FOREIGN as well.
Diffstat (limited to 'include')
-rw-r--r--include/meson.build7
-rw-r--r--include/util/token.h9
-rw-r--r--include/util/uuid.h8
-rw-r--r--include/wlr/config.h.in2
4 files changed, 9 insertions, 17 deletions
diff --git a/include/meson.build b/include/meson.build
index c72eada5..747e5984 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -9,13 +9,6 @@ if not features.get('xwayland')
else
subdir('xwayland')
endif
-if not features.get('xdg-foreign')
- exclude_files += [
- 'types/wlr_xdg_foreign_v1.h',
- 'types/wlr_xdg_foreign_v2.h',
- 'types/wlr_xdg_foreign_registry.h',
- ]
-endif
install_subdir('wlr',
install_dir: get_option('includedir'),
diff --git a/include/util/token.h b/include/util/token.h
new file mode 100644
index 00000000..bdfdaf45
--- /dev/null
+++ b/include/util/token.h
@@ -0,0 +1,9 @@
+#ifndef UTIL_TOKEN_H
+#define UTIL_TOKEN_H
+
+#include <stdbool.h>
+
+#define TOKEN_STRLEN 33
+bool generate_token(char out[static TOKEN_STRLEN]);
+
+#endif
diff --git a/include/util/uuid.h b/include/util/uuid.h
deleted file mode 100644
index 2fecb407..00000000
--- a/include/util/uuid.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef UTIL_UUID_H
-#define UTIL_UUID_H
-
-#include <stdbool.h>
-
-bool generate_uuid(char out[static 37]);
-
-#endif
diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in
index 15aacbfe..bcea55a1 100644
--- a/include/wlr/config.h.in
+++ b/include/wlr/config.h.in
@@ -7,6 +7,4 @@
#mesondefine WLR_HAS_XWAYLAND
-#mesondefine WLR_HAS_XDG_FOREIGN
-
#endif