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/D13299icc-effect-5.14.5
parent
7e2687ed3f
commit
c44adda40f
|
@ -123,11 +123,17 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
|
||||||
this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay);
|
this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay);
|
||||||
|
|
||||||
QToolTip::showText(Cursor::pos(), this->m_toolTipText);
|
QToolTip::showText(Cursor::pos(), this->m_toolTipText);
|
||||||
|
m_toolTipShowing = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
DecoratedClientImpl::~DecoratedClientImpl() = default;
|
DecoratedClientImpl::~DecoratedClientImpl()
|
||||||
|
{
|
||||||
|
if (m_toolTipShowing) {
|
||||||
|
requestHideToolTip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DecoratedClientImpl::signalShadeChange() {
|
void DecoratedClientImpl::signalShadeChange() {
|
||||||
emit decoratedClient()->shadedChanged(m_client->isShade());
|
emit decoratedClient()->shadedChanged(m_client->isShade());
|
||||||
|
@ -224,6 +230,7 @@ void DecoratedClientImpl::requestHideToolTip()
|
||||||
{
|
{
|
||||||
m_toolTipWakeUp.stop();
|
m_toolTipWakeUp.stop();
|
||||||
QToolTip::hideText();
|
QToolTip::hideText();
|
||||||
|
m_toolTipShowing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecoratedClientImpl::requestShowWindowMenu()
|
void DecoratedClientImpl::requestShowWindowMenu()
|
||||||
|
|
|
@ -115,6 +115,7 @@ private:
|
||||||
QString m_toolTipText;
|
QString m_toolTipText;
|
||||||
QTimer m_toolTipWakeUp;
|
QTimer m_toolTipWakeUp;
|
||||||
QDeadlineTimer m_toolTipFallAsleep;
|
QDeadlineTimer m_toolTipFallAsleep;
|
||||||
|
bool m_toolTipShowing = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue