WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
213 stars 136 forks source link

Add configuration option to allow moving window to background when wi… #1192

Closed pgorszkowski-igalia closed 11 months ago

pgorszkowski-igalia commented 11 months ago

…ndow.close is called

When allow_scripts_to_close_windows property is set to true, scripts can close windows that are not opened by them. But after window.close API is called, page is in "is closing" and browser expects window to be closed. When integrator wants to hide browser window/suspend browser, instead of closing it, page will be stuck in "is closing" state, where some APIs don't work anymore.

This change introduces new property allow_move_to_suspend_on_window_close (disabled by default) which removes setting "is closing" state and just sends notification to browser integration, without any expectations on how it's handled.

pgorszkowski-igalia commented 11 months ago

Tested with COG on RPi with flag: "--allow-move-to-suspend-on-window-close"