KCEF icon indicating copy to clipboard operation
KCEF copied to clipboard

Expose isWindowless for the browser

Open DrUlysses opened this issue 4 months ago • 4 comments

Call to browser.isWindowless currently causes Unresolved reference Is used to check if the browser is running in OSR mode

DrUlysses avatar Aug 14 '25 09:08 DrUlysses

I think it should be like

  class KCEFBrowser internal constructor(
      val client: KCEFClient,
      private val browser: CefBrowser
  ) : CefBrowser by browser {

      val mainKCEFFrame: KCEFFrame
          get() = mainFrame as KCEFFrame
  
      val focusedKCEFFrame: KCEFFrame
          get() = focusedFrame as KCEFFrame
  
      val isWindowless: Boolean
          get() = browser.isWindowless

but I am not sure (if override is needed), since I can't compile the lib locally

DrUlysses avatar Aug 14 '25 10:08 DrUlysses

KCEFBrowser already exposes all CefBrowser fields and methods

DatL4g avatar Aug 14 '25 11:08 DatL4g

Hmm. Strange. I have tried to call it here https://github.com/KevinnZou/compose-webview-multiplatform/blob/main/webview/src/desktopMain/kotlin/com/multiplatform/webview/web/WebView.desktop.kt#L145 But got an Unresolved reference error. Can it be, what compose-webview-multiplatform has a problem with the dependencies and therefore it can't be called there?

DrUlysses avatar Aug 14 '25 15:08 DrUlysses

@DatL4g So I have used windowless framerate call (browser.windowlessFrameRate.get) therefore: https://github.com/KevinnZou/compose-webview-multiplatform/pull/353/commits/c0d7bf654687f880ab5da5b906cca42862f9ed13#diff-e3597289ce5c997d467211ef71857a5dde024d837e70571152ec7ccaffee8eacR140

DrUlysses avatar Aug 19 '25 05:08 DrUlysses