From 2f72083601fb6a4fcc66b6440222291fc334cb3f Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Fri, 6 Sep 2019 11:18:20 +0200
Subject: [PATCH] Fix WebEngineView flashing when closing popup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closing a popup (eg. HTML select element) might cause WebEngineView to
flash on macOS. This seems to be related to the window's NSPanel
destruction and seems to appear only if the Qt::ToolTip window flag is
set.

Fixes: QTBUG-77072
Fixes: QTBUG-78084
Change-Id: I72af67ee97304278870b312482f8f9058ecd1233
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
---
 .../render_widget_host_view_qt_delegate_quickwindow.cpp         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index c085aacd7..3648df3c1 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -48,7 +48,7 @@ RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWi
     : m_realDelegate(realDelegate)
     , m_virtualParent(nullptr)
 {
-    setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
+    setFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
 }
 
 RenderWidgetHostViewQtDelegateQuickWindow::~RenderWidgetHostViewQtDelegateQuickWindow()
-- 
GitLab