Is there a way to launch a window in fullscreen using code, i.e., using CreateBrowser to create a fullscreen window?
My CEF application isn't using views, so would I have to use X11 (on Linux) to make the windows fullscreen?
---
original post:
Is there an easy way to get all browser windows and fullscreen them using code, as a response to a frontend window.cefQuery request?
I've tried using SetFullscreen from cef_window.h in my query processor, on a UI thread, but it doesn't seem to work. There also doesn't seem to be a good way to retrieve pointers to all the browsers that are currently open, within the query processor.
This is the code I'm trying to use to fullscreen things:
- Code: Select all
const CefRefPtr<CefBrowserView> browser_view = CefBrowserView::GetForBrowser(browser);
if (browser_view) {
CefRefPtr<CefWindow> window = browser_view->GetWindow();
if (window) {
window->SetFullscreen(true);
}
}
I also found this topic: https://magpcss.org/ceforum/viewtopic.p ... 706#p21198
but it's a lot older and I didn't have much success with borderless window mode.