Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent window background (desktop-only) #868

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chicoxyzzy
Copy link
Member

  • macOS
  • Linux
  • Windows

@chicoxyzzy chicoxyzzy self-assigned this Dec 28, 2023
src/android/window.cc Outdated Show resolved Hide resolved
@chicoxyzzy chicoxyzzy changed the title Transparent window background Transparent window background (desktop-only) Dec 28, 2023
@chicoxyzzy
Copy link
Member 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
Member Author

TODO: add tests for JS API

@chicoxyzzy
Copy link
Member 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
2 participants