summaryrefslogtreecommitdiffstats
path: root/recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch')
-rw-r--r--recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch b/recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch
new file mode 100644
index 00000000..0f5c4c5f
--- /dev/null
+++ b/recipes-wam/cef/files/cef/0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch
@@ -0,0 +1,129 @@
+From 7eefab1c1a8938145f9fb3a5d7a8fa58ca7ad695 Mon Sep 17 00:00:00 2001
+From: Roger Zanoni <rzanoni@igalia.com>
+Date: Fri, 30 Jun 2023 10:27:03 +0200
+Subject: [PATCH 6/9] Add a method to check if the agl window is configured
+
+---
+ include/views/cef_window.h | 6 ++++++
+ libcef/browser/views/view_util.h | 1 +
+ libcef/browser/views/view_util_aura.cc | 20 +++++++++++++++-----
+ libcef/browser/views/window_impl.cc | 4 ++++
+ libcef/browser/views/window_impl.h | 1 +
+ 5 files changed, 27 insertions(+), 5 deletions(-)
+
+diff --git a/include/views/cef_window.h b/include/views/cef_window.h
+index 22fe2e2a1..c34963302 100644
+--- a/include/views/cef_window.h
++++ b/include/views/cef_window.h
+@@ -399,6 +399,12 @@ class CefWindow : public CefPanel {
+ /*--cef()--*/
+ virtual void AglSetPanelApp(uint32_t edge) = 0;
+
++ ///
++ /// Tells if the window wayland surface is configured
++ ///
++ /*--cef()--*/
++ virtual bool IsSurfaceConfigured() = 0;
++
+ // -----------------
+ };
+
+diff --git a/libcef/browser/views/view_util.h b/libcef/browser/views/view_util.h
+index bc12a9ddc..bf657fd39 100644
+--- a/libcef/browser/views/view_util.h
++++ b/libcef/browser/views/view_util.h
+@@ -172,6 +172,7 @@ void AglSetAppId(views::Widget* widget, const std::string& app_id);
+ void AglSetAppReady(views::Widget* widget);
+ void AglSetBackGroundApp(views::Widget* widget);
+ void AglSetPanelApp(views::Widget* widget, uint32_t edge);
++bool IsSurfaceConfigured(views::Widget* widget);
+
+ // -----------------
+
+diff --git a/libcef/browser/views/view_util_aura.cc b/libcef/browser/views/view_util_aura.cc
+index 2dabf5eae..2946a2d81 100644
+--- a/libcef/browser/views/view_util_aura.cc
++++ b/libcef/browser/views/view_util_aura.cc
+@@ -66,7 +66,7 @@ void AglActivateApp(views::Widget* widget, const std::string& app) {
+ }
+ aura::Window* window = widget->GetNativeWindow();
+ if (window && window->GetRootWindow()) {
+- return window->GetHost()->SetAglActivateApp(app);
++ window->GetHost()->SetAglActivateApp(app);
+ }
+ }
+
+@@ -76,7 +76,7 @@ void AglSetAppId(views::Widget* widget, const std::string& app_id) {
+ }
+ aura::Window* window = widget->GetNativeWindow();
+ if (window && window->GetRootWindow()) {
+- return window->GetHost()->SetAglAppId(app_id);
++ window->GetHost()->SetAglAppId(app_id);
+ }
+ }
+
+@@ -86,7 +86,7 @@ void AglSetAppReady(views::Widget* widget) {
+ }
+ aura::Window* window = widget->GetNativeWindow();
+ if (window && window->GetRootWindow()) {
+- return window->GetHost()->SetAglReady();
++ window->GetHost()->SetAglReady();
+ }
+ }
+
+@@ -96,7 +96,7 @@ void AglSetBackGroundApp(views::Widget* widget) {
+ }
+ aura::Window* window = widget->GetNativeWindow();
+ if (window && window->GetRootWindow()) {
+- return window->GetHost()->SetAglBackground();
++ window->GetHost()->SetAglBackground();
+ }
+ }
+
+@@ -106,7 +106,17 @@ void AglSetPanelApp(views::Widget* widget, uint32_t edge) {
+ }
+ aura::Window* window = widget->GetNativeWindow();
+ if (window && window->GetRootWindow()) {
+- return window->GetHost()->SetAglPanel(edge);
++ window->GetHost()->SetAglPanel(edge);
++ }
++}
++
++bool IsSurfaceConfigured(views::Widget* widget) {
++ if (!widget) {
++ return false;
++ }
++ aura::Window* window = widget->GetNativeWindow();
++ if (window && window->GetRootWindow()) {
++ return window->GetHost()->IsSurfaceConfigured();
+ }
+ }
+
+diff --git a/libcef/browser/views/window_impl.cc b/libcef/browser/views/window_impl.cc
+index 8b347bf4a..8edac98b5 100644
+--- a/libcef/browser/views/window_impl.cc
++++ b/libcef/browser/views/window_impl.cc
+@@ -791,4 +791,8 @@ void CefWindowImpl::AglSetPanelApp(uint32_t edge) {
+ view_util::AglSetPanelApp(widget_, edge);
+ }
+
++bool CefWindowImpl::IsSurfaceConfigured() {
++ return view_util::IsSurfaceConfigured(widget_);
++}
++
+ // -----------------
+diff --git a/libcef/browser/views/window_impl.h b/libcef/browser/views/window_impl.h
+index 20514fc32..7f7b47e1a 100644
+--- a/libcef/browser/views/window_impl.h
++++ b/libcef/browser/views/window_impl.h
+@@ -141,6 +141,7 @@ class CefWindowImpl
+ void AglSetAppReady() override;
+ void AglSetBackGroundApp() override;
+ void AglSetPanelApp(uint32_t edge) override;
++ bool IsSurfaceConfigured() override;
+
+ // -----------------
+
+--
+2.42.0
+