diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-10 16:02:15 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-13 18:54:17 +0200 |
commit | 1093562d08f325bbbdcd60627eadae535779e376 (patch) | |
tree | 689d91d74977e3bd67247ef9c96ce6e0628b0268 /src/plugins/platforms/cocoa/qnswindow.mm | |
parent | e346b9524c12c988ba5b95a4bc39d23fd2620cf2 (diff) |
Don't hide QToolTip automatically when another window is closed
QTipLabel has a global application event filter, looking for reasons
to close the tooltip. To fix QTBUG-55523 an additional condition was
added in 7c18cb4f83c4907b40abc0bf40c1573b02243b57 to also close the
tooltip when intercepting QEvent::Close, but this was unnecessary,
as the fix in 29205c53e46fb2fc9f8063a46fd5ef5e9be532db was sufficient.
Furthermore, hiding the tooltip on close events turned out to cause
issues when the closing widget/window was the tooltip itself, causing
recursion. This was fixed by 24239aef35f856c4c06428077e3428cbfdc51775.
(which unintentionally also changed behavior for WindowActivate,
WindowDeactivate, FocusIn, and FocusOut due to the case fallthrough).
As it turns out, there is another case that will close the tooltip
prematurely, and that's when the Qt::UI_AnimateTooltip effect is
enabled, which is the case on e.g. Windows. In that situation a
QRollEffect widget is created for the duration of the effect,
which is then closed after the effect finishes. When closing
the effect via QWidget close, we'll end up with a close event,
triggering QTipLabel to hide itself.
Since the logic of hiding the tooltip when other windows close
was never needed to fix the original issue in QTBUG-55523, we
opt to remove it completely, instead of adding even more
heuristics to the code.
Task-number: QTBUG-55523
Change-Id: I8d341262c85fd2e8cf9c496974e46ae0e9245e5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindow.mm')
0 files changed, 0 insertions, 0 deletions