summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-10-18 22:13:29 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-10-24 10:47:43 +0000
commit509d566ec0f257f7f1a723096b57a718d43d5002 (patch)
tree321c8ded1dbdeeb5d1fe3a9b8b05111cd6c3df30 /src/gui/kernel/qguiapplication.cpp
parent72bedd49bfb02ba7c7abf2a1a4c6cd165ebcd447 (diff)
Don't block mouse events if the window is a Tooltip type
If a tooltip was shown on an application modal dialog then it would end up blocking mouse events to the dialog while the tooltip was visible. Since tooltips are special in this case, they should not cause mouse events to be blocked. Fixes: QTBUG-65599 Change-Id: Ibf1729ca4942f5854e4f9687c5586382e23c1c31 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 193712a7a7..06d1fcae53 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -792,7 +792,8 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
{
bool shouldBeBlocked = false;
- if (!QWindowPrivate::get(window)->isPopup() && !self->modalWindowList.isEmpty())
+ const bool popupType = (window->type() == Qt::ToolTip) || (window->type() == Qt::Popup);
+ if (!popupType && !self->modalWindowList.isEmpty())
shouldBeBlocked = self->isWindowBlocked(window);
updateBlockedStatusRecursion(window, shouldBeBlocked);
}