macOS: Use public API for fullscreen in wxWebView

To enable fullscreen support with WKWebView private API which was
available since macOS 10.11 was used. Beginning with macOS 12.1 this
resulted in unpredictable layout issues inside the webview.

This reimplementation using java script and message handlers does only
use public API. This also makes the fullscreen message more controlable
as the webview does no longer put the containing window in fullscreen
mode without application code intervention. That also unifies macOS with
the way Edge sends this event in MSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/2629
This commit is contained in:
Tobias Taschner
2021-12-23 13:25:01 +01:00
committed by Vadim Zeitlin
parent c864c9119b
commit a5cec42bb6
2 changed files with 28 additions and 28 deletions

View File

@@ -306,6 +306,7 @@ WebFrame::WebFrame(const wxString& url) :
// set the frame icon
SetIcon(wxICON(sample));
SetTitle("wxWebView Sample");
EnableFullScreenView(); // Enable native fullscreen API on macOS
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);