diff options
authorAlexandru Croitor <>2016-04-13 16:08:59 +0200
committerAlexandru Croitor <>2016-04-15 07:49:15 +0000
commit4474bca6dbea9dcd47936dc1ca8f8da2745520b0 (patch)
parentd1168fda00c6eaff0f367d969639eec9adadb907 (diff)
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 <>
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
--- a/examples/webenginewidgets/demobrowser/tabwidget.cpp
+++ b/examples/webenginewidgets/demobrowser/tabwidget.cpp
@@ -392,9 +392,12 @@ void TabWidget::fullScreenRequested(QWebEngineFullScreenRequest request)
WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
- raise();
- m_fullScreenView->hide();
- m_fullScreenNotification->hide();
+ // 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;
+ window()->hide();
+ window()->show();