cef
cef copied to clipboard
Remember last position and size of Document Picture-in-Picture window between application restarts
Problem
The Document Picture-in-Picture (PiP) feature doesn't remember the last position and size of the window. Each time I enable DPiP after application restart, I have to manually resize and reposition the window to my preferred settings.
Solution
I would like the CEF project to implement a feature that allows the Document Picture-in-Picture window to remember its last position and size. This means that when a user reopens the DPiP window, it should appear in the same location and with the same dimensions as when it was last closed, even after app restart.
Alternatives
As an alternative, this feature request could be reported to the Chromium project
Additional context
The current implementation is using PictureInPictureBoundsCache that stores the last position throughout the lifetime of the program, but it gets reset after program restarts
browser_params.initial_bounds =
PictureInPictureWindowManager::GetInstance()
->CalculateInitialPictureInPictureWindowBounds(*pip_options,
display);