summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-05-30 14:57:00 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-06-04 09:09:59 +0000
commitef17b79a4e496ee4c6a390ef27427f1a94118c80 (patch)
tree7450de4b0d753a628089fe48ab66c1fb64e76f40 /src/webenginewidgets
parent914d4346da5b69bfeab4c94eb380050853120c1c (diff)
RWHVQDW: Remove QGuiApplication::sync() call
It is a workaround that is no longer needed. Task-number: QTBUG-64501 Change-Id: I51b7ad0a24cf80ee0c90be0c8c463ceeeee4239e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 98482ae78..6b57eac78 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -245,20 +245,18 @@ QRectF RenderWidgetHostViewQtDelegateWidget::contentsRect() const
void RenderWidgetHostViewQtDelegateWidget::setKeyboardFocus()
{
- // If the corresponding window is inactive (for example, because of a popup),
- // the active focus cannot be set. Sync up with the Window System to try to
- // reactivate the window in time if the other window (possibly popup) which took
- // the focus is already closed.
- if (window() && !window()->isActive())
- QGuiApplication::sync();
-
- m_rootItem->forceActiveFocus();
+ // The root item always has focus within the root focus scope:
+ Q_ASSERT(m_rootItem->hasFocus());
+
setFocus();
}
bool RenderWidgetHostViewQtDelegateWidget::hasKeyboardFocus()
{
- return m_rootItem->hasActiveFocus();
+ // The root item always has focus within the root focus scope:
+ Q_ASSERT(m_rootItem->hasFocus());
+
+ return hasFocus();
}
void RenderWidgetHostViewQtDelegateWidget::lockMouse()