From 2909b8c6df3da9ef52a9464c404e8d7913a8587e Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 15 Oct 2024 13:51:23 +0100 Subject: [PATCH 1/3] Bump the KCEF dependency version --- sample/desktopApp/src/jvmMain/kotlin/main.kt | 8 +++++++- webview/build.gradle.kts | 2 +- .../kotlin/com/multiplatform/webview/web/WebEngineExt.kt | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sample/desktopApp/src/jvmMain/kotlin/main.kt b/sample/desktopApp/src/jvmMain/kotlin/main.kt index 30419f5b..564f6a7b 100644 --- a/sample/desktopApp/src/jvmMain/kotlin/main.kt +++ b/sample/desktopApp/src/jvmMain/kotlin/main.kt @@ -9,6 +9,7 @@ import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import com.kevinnzou.sample.MainWebView import dev.datlag.kcef.KCEF +import dev.datlag.kcef.KCEFBuilder.Download import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import java.io.File @@ -32,7 +33,12 @@ fun main() = initialized = true } } - release("jbr-release-17.0.10b1087.23") + download( + Download.Builder().github { + release("jbr-release-17.0.10b1087.23") + }.build() + ) + settings { cachePath = File("cache").absolutePath } diff --git a/webview/build.gradle.kts b/webview/build.gradle.kts index 5731a505..78222fca 100644 --- a/webview/build.gradle.kts +++ b/webview/build.gradle.kts @@ -64,7 +64,7 @@ kotlin { val desktopMain by getting { dependencies { implementation(compose.desktop.common) - api("dev.datlag:kcef:2024.01.07.1") + api("dev.datlag:kcef:2024.04.20.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutinesVersion") } } diff --git a/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt b/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt index 08b2a0a6..d75cb046 100644 --- a/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt +++ b/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt @@ -51,6 +51,10 @@ internal fun CefBrowser.addDisplayHandler(state: WebViewState) { state.pageTitle = title } + override fun onFullscreenModeChange(p0: CefBrowser?, p1: Boolean) { + // Not supported + } + override fun onTooltip( browser: CefBrowser?, text: String?, From 4c9f3056b81162a1d0af1faf5c8b1f017e043842 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 15 Oct 2024 16:47:04 +0100 Subject: [PATCH 2/3] Bump jbr version --- sample/desktopApp/src/jvmMain/kotlin/main.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sample/desktopApp/src/jvmMain/kotlin/main.kt b/sample/desktopApp/src/jvmMain/kotlin/main.kt index 564f6a7b..51d7b726 100644 --- a/sample/desktopApp/src/jvmMain/kotlin/main.kt +++ b/sample/desktopApp/src/jvmMain/kotlin/main.kt @@ -33,11 +33,11 @@ fun main() = initialized = true } } - download( - Download.Builder().github { - release("jbr-release-17.0.10b1087.23") - }.build() - ) + download { + github { + release("jbr-release-17.0.12b1207.37") + } + } settings { cachePath = File("cache").absolutePath From 9b154faf1a794c8619c9ed32553a46347a92fbb3 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 18 Oct 2024 12:09:29 +0100 Subject: [PATCH 3/3] Keep klint happy --- sample/desktopApp/src/jvmMain/kotlin/main.kt | 1 - .../kotlin/com/multiplatform/webview/web/WebEngineExt.kt | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sample/desktopApp/src/jvmMain/kotlin/main.kt b/sample/desktopApp/src/jvmMain/kotlin/main.kt index 51d7b726..ee0183ed 100644 --- a/sample/desktopApp/src/jvmMain/kotlin/main.kt +++ b/sample/desktopApp/src/jvmMain/kotlin/main.kt @@ -9,7 +9,6 @@ import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import com.kevinnzou.sample.MainWebView import dev.datlag.kcef.KCEF -import dev.datlag.kcef.KCEFBuilder.Download import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import java.io.File diff --git a/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt b/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt index d75cb046..6d4979ad 100644 --- a/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt +++ b/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebEngineExt.kt @@ -51,7 +51,10 @@ internal fun CefBrowser.addDisplayHandler(state: WebViewState) { state.pageTitle = title } - override fun onFullscreenModeChange(p0: CefBrowser?, p1: Boolean) { + override fun onFullscreenModeChange( + p0: CefBrowser?, + p1: Boolean, + ) { // Not supported }