diff --git a/decorations/decoratedclient.cpp b/decorations/decoratedclient.cpp index 6d4b6e7b32..2664c44d5a 100644 --- a/decorations/decoratedclient.cpp +++ b/decorations/decoratedclient.cpp @@ -123,11 +123,17 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay); QToolTip::showText(Cursor::pos(), this->m_toolTipText); + m_toolTipShowing = true; } ); } -DecoratedClientImpl::~DecoratedClientImpl() = default; +DecoratedClientImpl::~DecoratedClientImpl() +{ + if (m_toolTipShowing) { + requestHideToolTip(); + } +} void DecoratedClientImpl::signalShadeChange() { emit decoratedClient()->shadedChanged(m_client->isShade()); @@ -224,6 +230,7 @@ void DecoratedClientImpl::requestHideToolTip() { m_toolTipWakeUp.stop(); QToolTip::hideText(); + m_toolTipShowing = false; } void DecoratedClientImpl::requestShowWindowMenu() diff --git a/decorations/decoratedclient.h b/decorations/decoratedclient.h index adb5399aec..f21503256d 100644 --- a/decorations/decoratedclient.h +++ b/decorations/decoratedclient.h @@ -115,6 +115,7 @@ private: QString m_toolTipText; QTimer m_toolTipWakeUp; QDeadlineTimer m_toolTipFallAsleep; + bool m_toolTipShowing = false; }; }