0001-ozone-wayland-implement-text_input_manager-fixes.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ui/ozone/platform/wayland/host/zwp_text_input_wrapper.h
  2. # https://github.com/chromium/chromium/commit/de30ba3f21f824be05443d5820b988d226780d68
  3. Support offset of surrounding text in Lacros wayland client.
  4. # https://github.com/chromium/chromium/commit/71bba2b7ae8117fdf053563a864d6cff018d7e94
  5. Support large size surrounding text in Lacros.
  6. ---
  7. diff --git a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.cc b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.cc
  8. index a3ce6e4..83f2c58 100644
  9. --- a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.cc
  10. +++ b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.cc
  11. @@ -147,6 +147,14 @@ void ZWPTextInputWrapperV3::SetSurroundingText(
  12. zwp_text_input_v3_commit(obj_.get());
  13. }
  14. +bool ZWPTextInputWrapperV3::HasAdvancedSurroundingTextSupport() const {
  15. + return false;
  16. +}
  17. +
  18. +void ZWPTextInputWrapperV3::SetSurroundingTextOffsetUtf16(
  19. + uint32_t offset_utf16) {
  20. +}
  21. +
  22. void ZWPTextInputWrapperV3::ResetPendingState() {
  23. commit_string_.clear();
  24. delete_surrounding_text_before_length_ = 0;
  25. diff --git a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.h b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.h
  26. index 204d7e3..5d03a1d 100644
  27. --- a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.h
  28. +++ b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v3.h
  29. @@ -45,6 +45,8 @@ class ZWPTextInputWrapperV3 : public ZWPTextInputWrapper {
  30. void SetCursorRect(const gfx::Rect& rect) override;
  31. void SetSurroundingText(const std::string& text,
  32. const gfx::Range& selection_range) override;
  33. + bool HasAdvancedSurroundingTextSupport() const override;
  34. + void SetSurroundingTextOffsetUtf16(uint32_t offset_utf16) override;
  35. void SetContentType(TextInputType type,
  36. TextInputMode mode,
  37. uint32_t flags,