Hide decoration tooltip when the decoration gets destroyed

Summary:
BUG: 394977
FIXED-IN: 5.13.1

Test Plan: Manual testing

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13299
icc-effect-5.14.5
Martin Flöser 2018-06-03 13:29:36 +02:00
parent 7e2687ed3f
commit c44adda40f
2 changed files with 9 additions and 1 deletions

View File

@ -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()

View File

@ -115,6 +115,7 @@ private:
QString m_toolTipText;
QTimer m_toolTipWakeUp;
QDeadlineTimer m_toolTipFallAsleep;
bool m_toolTipShowing = false;
};
}