aboutsummaryrefslogtreecommitdiff
path: root/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc')
-rw-r--r--www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc b/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
new file mode 100644
index 000000000000..5bcda1e36cc6
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-ui_ozone_platform_wayland_host_zwp__text__input__wrapper__v1.cc
@@ -0,0 +1,21 @@
+--- ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.orig 2023-09-17 07:59:53 UTC
++++ ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
+@@ -225,6 +225,10 @@ void ZWPTextInputWrapperV1::SetSurroundingText(
+ // so if it exceeds 16 bits, it may be broken.
+ static constexpr size_t kSizeLimit = 60000;
+ if (HasAdvancedSurroundingTextSupport() && text.length() > kSizeLimit) {
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048
++ PLOG(ERROR) << "memfd is not supported";
++ return;
++#else
+ base::ScopedFD memfd(memfd_create("surrounding_text", MFD_CLOEXEC));
+ if (!memfd.get()) {
+ PLOG(ERROR) << "Failed to create memfd";
+@@ -237,6 +241,7 @@ void ZWPTextInputWrapperV1::SetSurroundingText(
+ zcr_extended_text_input_v1_set_large_surrounding_text(
+ extended_obj_.get(), memfd.get(), text.length(),
+ selection_range.start(), selection_range.end());
++#endif
+ } else {
+ zwp_text_input_v1_set_surrounding_text(obj_.get(), text.c_str(),
+ selection_range.start(),