I tried this way:
1. ExecuteJavascript in console,
- Code: Select all
document.visibilityState = 'hidden'
2. Use
- Code: Select all
browser->GetHost()->WasHidden(true);
but I don't know how to disable rendering.Notify the browser that it has been hidden or shown. Layouting and CefRenderHandler::OnPaint notification will stop when the browser is hidden. This method is only used when window rendering is disabled.
3.Use
- Code: Select all
SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
- Code: Select all
ShowWindow(hwnd, SW_SHOW);
- Code: Select all
MoveWindow(hwnd, rect.x(), rect.y(), rect.width(), rect.height(), true);
So, what the correct way to set document.visibilityState?