[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwin/Plasma/5.13] decorations: Hide decoration tooltip when the decoration gets destroyed
From: Martin_Flöser <null () kde ! org>
Date: 2018-06-10 7:19:29
Message-ID: E1fRudN-0002U1-FJ () code ! kde ! org
[Download RAW message or body]
Git commit c44adda40f47418ce6eea974b2a3c3b1e77fa205 by Martin Flöser.
Committed on 10/06/2018 at 07:18.
Pushed by graesslin into branch 'Plasma/5.13'.
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
M +8 -1 decorations/decoratedclient.cpp
M +1 -0 decorations/decoratedclient.h
https://commits.kde.org/kwin/c44adda40f47418ce6eea974b2a3c3b1e77fa205
diff --git a/decorations/decoratedclient.cpp b/decorations/decoratedclient.cpp
index 6d4b6e7b3..2664c44d5 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 adb5399ae..f21503256 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;
};
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic