|author||Alexandru Croitor <firstname.lastname@example.org>||2016-04-13 16:08:59 +0200|
|committer||Alexandru Croitor <email@example.com>||2016-04-15 07:49:15 +0000|
Demobrowser: Fix black screen after exiting fullscreen mode on OS X.
When exiting fullscreen while viewing a full screen video, the video is replaced with a black screen, and does not switch back to the initial page. This happens when hide() is called on a native window while being in fullscreen, which hides the window, but does not exit full screen mode, thus showing a black screen. The workaround fix consists of two parts: 1) Make sure to delete the fullscreen window object, to release the OS virtual screen it occupies (visible in mission control as a black rectangle). 2) Hide and show the main page window, to force exit fullscreen mode. Change-Id: I364d4427e84957ed97f57a14e2cfc2c95aed6f48 Task-number: QTBUG-52058 Reviewed-by: Kai Koehne <firstname.lastname@example.org>
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/webenginewidgets/demobrowser/tabwidget.cpp b/examples/webenginewidgets/demobrowser/tabwidget.cpp
index 73ca39bf9..3f859c386 100644
@@ -392,9 +392,12 @@ void TabWidget::fullScreenRequested(QWebEngineFullScreenRequest request)
WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
+ // Change the delete and window hide/show back to a simple m_fullScreenView->hide()
+ // once QTBUG-46701 gets fixed.
+ delete m_fullScreenView;
+ m_fullScreenView = 0;