From 0df08dec91978aa9c0773537355331264c0960ac Mon Sep 17 00:00:00 2001 From: Friwi Date: Wed, 3 Dec 2025 15:54:31 +0100 Subject: [PATCH 1/2] Update CEF to "142.0.17+g60aac24+chromium-142.0.7444.176" --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a1c2be4..a139981a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,7 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON) # Specify the CEF distribution version. if(NOT DEFINED CEF_VERSION) - set(CEF_VERSION "141.0.10+g1d65b0d+chromium-141.0.7390.123") + set(CEF_VERSION "142.0.17+g60aac24+chromium-142.0.7444.176") endif() # Determine the platform. From d5b06c7054a43149946a08e7900c04714aa72f18 Mon Sep 17 00:00:00 2001 From: Friwi Date: Wed, 3 Dec 2025 16:15:06 +0100 Subject: [PATCH 2/2] Fix jogl canvas error on MacOS A jogl canvas will throw an error if addNotify is called twice in a row without calling removeNotify in between. On MacOS the platform might sometimes not call removeNotify, so we post notify the canvas instead of its previous removal. --- java/org/cef/browser/CefBrowserOsr.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/java/org/cef/browser/CefBrowserOsr.java b/java/org/cef/browser/CefBrowserOsr.java index b999b6ba..4a87b2ea 100644 --- a/java/org/cef/browser/CefBrowserOsr.java +++ b/java/org/cef/browser/CefBrowserOsr.java @@ -199,11 +199,15 @@ public void paint(Graphics g) { @Override public void addNotify() { - super.addNotify(); - if (removed_) { - notifyAfterParentChanged(); - removed_ = false; + if (!removed_) { + // On MacOS it may happen that the platform has not correctly notified us of a previous removal. + // In this case, the jogl canvas will throw an error because of a second add operation in a row. + // We patch this by post-notifying the canvas of the removal first, before notifying the canvas as normal. + super.removeNotify(); } + super.addNotify(); + notifyAfterParentChanged(); + removed_ = false; } @Override