summaryrefslogtreecommitdiffstats
path: root/recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2023-06-22 09:15:24 +0200
committerRoger Zanoni <rzanoni@igalia.com>2023-07-18 15:28:52 +0200
commit7a7c0e1f4c62ab976dfd2a58d33ed93d62c587d3 (patch)
tree09969ca71e2d5954435cd7f72cc7b1372bc312f3 /recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch
parent49cf21e8cfb685dbb0c7843d468d7ed44e886c11 (diff)
[wam][cef] Add the CEF recipe
This change makes it possible to build applications that depend on libcef, and also adds a few changes picked from our previous implementation that enables the applications to communicate with the agl-compositor. Bug-AGL: SPEC-3872 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: I215138b8f5d63da84ada2f8c006f4025f0b3fafb
Diffstat (limited to 'recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch')
-rw-r--r--recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch b/recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch
new file mode 100644
index 00000000..75b44e3f
--- /dev/null
+++ b/recipes-wam/cef/files/cef/0005-Linux-Fix-build-without-X11-fixes-issue-3431.patch
@@ -0,0 +1,62 @@
+From b0bdd62be712b69db9164e80d4190d2bc72dcb3c Mon Sep 17 00:00:00 2001
+From: Enrique Turegano Pedruelo <epedruelo@netskope.com>
+Date: Tue, 10 Jan 2023 21:30:47 +0000
+Subject: [PATCH 05/10] Linux: Fix build without X11 (fixes issue #3431)
+
+---
+ .../browser_platform_delegate_native_linux.cc | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc
+index 5972a3134..95ca3df39 100644
+--- a/libcef/browser/native/browser_platform_delegate_native_linux.cc
++++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc
+@@ -16,14 +16,14 @@
+ #include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
+ #include "ui/events/keycodes/dom/dom_key.h"
+ #include "ui/events/keycodes/dom/keycode_converter.h"
+-#include "ui/events/keycodes/keyboard_code_conversion_x.h"
+-#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
+ #include "ui/events/keycodes/keysym_to_unicode.h"
+ #include "ui/gfx/font_render_params.h"
+ #include "ui/views/widget/widget.h"
+
+ #if BUILDFLAG(OZONE_PLATFORM_X11)
+ #include "libcef/browser/native/window_x11.h"
++#include "ui/events/keycodes/keyboard_code_conversion_x.h"
++#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
+ #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
+ #endif
+
+@@ -240,9 +240,15 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
+ static_cast<ui::KeyboardCode>(key_event.windows_key_code);
+ ui::DomCode dom_code =
+ ui::KeycodeConverter::NativeKeycodeToDomCode(key_event.native_key_code);
++
++#if BUILDFLAG(OZONE_PLATFORM_X11)
+ int keysym = ui::XKeysymForWindowsKeyCode(
+ key_code, !!(key_event.modifiers & EVENTFLAG_SHIFT_DOWN));
+ char16_t character = ui::GetUnicodeCharacterFromXKeySym(keysym);
++#else
++ char16_t character = key_event.character;
++#endif
++
+ base::TimeTicks time_stamp = GetEventTimeStamp();
+
+ if (key_event.type == KEYEVENT_CHAR) {
+@@ -262,7 +268,12 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
+ NOTREACHED();
+ }
+
++#if BUILDFLAG(OZONE_PLATFORM_X11)
+ ui::DomKey dom_key = ui::XKeySymToDomKey(keysym, character);
++#else
++ ui::DomKey dom_key = ui::DomKey::NONE;
++#endif
++
+ return ui::KeyEvent(type, key_code, dom_code, flags, dom_key, time_stamp);
+ }
+
+--
+2.39.2
+