cef icon indicating copy to clipboard operation
cef copied to clipboard

Remember last position and size of Document Picture-in-Picture window between application restarts

Open nik-sp opened this issue 8 months ago • 2 comments

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

Chromium

      browser_params.initial_bounds =
          PictureInPictureWindowManager::GetInstance()
              ->CalculateInitialPictureInPictureWindowBounds(*pip_options,
                                                             display);

nik-sp avatar Jun 11 '24 10:06 nik-sp