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>
This commit is contained in:
Andy Shaw 2018-10-18 22:13:29 +02:00
parent 72bedd49bf
commit 509d566ec0

View File

@ -792,7 +792,8 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window) void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
{ {
bool shouldBeBlocked = false; 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); shouldBeBlocked = self->isWindowBlocked(window);
updateBlockedStatusRecursion(window, shouldBeBlocked); updateBlockedStatusRecursion(window, shouldBeBlocked);
} }