Skip to content

Conversation

@chicoxyzzy
Copy link
Contributor

  • macOS
  • Linux
  • Windows

@chicoxyzzy chicoxyzzy self-assigned this Dec 28, 2023
@chicoxyzzy chicoxyzzy changed the title Transparent window background Transparent window background (desktop-only) Dec 28, 2023
@chicoxyzzy chicoxyzzy force-pushed the transparent_window_backgroud branch from f8527af to dbea6b5 Compare December 28, 2023 15:41
@chicoxyzzy chicoxyzzy force-pushed the transparent_window_backgroud branch from dbea6b5 to 1148b0f Compare December 28, 2023 16:00
@chicoxyzzy
Copy link
Contributor Author

chicoxyzzy commented Dec 29, 2023

I'm trying to add this on Windows

    if (opts.transparent) {
      CORE2WEBVIEW_COLOR color = { 0 };
      webview->put_DefaultBackgroundColor(color);
    }

it compiles fine, without errors in the app, but it doesn't work for me

I took example code from here
https://github.com/MicrosoftEdge/WebView2Samples/blob/85e53c9dc4245ed74fc737554640644d4b0f3bb5/SampleApps/WebView2APISample/ViewComponent.cpp#L84
and it looks correct acccording to what I see in the webview2 win32 c++ api

@chicoxyzzy chicoxyzzy linked an issue Dec 29, 2023 that may be closed by this pull request
@chicoxyzzy
Copy link
Contributor Author

TODO: add tests for JS API

@chicoxyzzy
Copy link
Contributor Author

Should I rebase the branch? cc @heapwolf @jwerle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transparent background

3 participants