Hello,
I have a multi-platform application with an HTML/JS webview for a GUI, displayed over a natively rendered game screen.
Recently the UI designers changed the pause screen so that instead of covering the entire screen it let you see the paused game behind by using a semi-transparent background to the webview.
This has worked fine on most platforms (Android, iOS, Windows UWP) but not on win32 where CEF provides the webview.
Having looked around the topic I am beginning to suspect that this relatively cosmetic change is going to need me to completely re-architect my application display to use the slower off-screen rendering on win32.
Is it really the case that there is no simpler way to support a transparent background for a CEF window on win32?
Here's hoping there is.
Details:
CEF version is 3.3239.1723.g071d1c1
The HTML has bgcolor="transparent" set.
The CefBrowserSettings.background_color is set to 0x00000000
The CefSettings.background_color is set to 0x00000000 as well
CefWindowInfo doesn't have the very handy sounding SetTransparentPainting() method any more
The CEF window is currently SetAsChild() for my main game window, which can be windowed, borderless windowed or true fullscreen.
Tried SetAsPopup() for a change, and it also doesn't do transparency.
The main window is created Windowed by default with
style: WS_CLIPSIBLINGS | WS_CLIPCHILDREN |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME;
extended style: WS_EX_APPWINDOW
(via GLFW)
The child (CEF) window is SetAsChild() which sets:
style: WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | WS_VISIBLE
I tried adding WS_EX_LAYERED to the CEF window, but that didn't make any difference.
I'm using C/C++