diff --git a/decorations/decoratedclient.cpp b/decorations/decoratedclient.cpp
index ff5ce64d4e..09cc3d6410 100644
--- a/decorations/decoratedclient.cpp
+++ b/decorations/decoratedclient.cpp
@@ -31,6 +31,7 @@ along with this program. If not, see .
#include
#include
+#include
namespace KWin
{
@@ -200,6 +201,17 @@ QColor DecoratedClientImpl::color(KDecoration2::ColorGroup group, KDecoration2::
return QColor();
}
+void DecoratedClientImpl::requestShowToolTip(const QString &text)
+{
+ QPoint pos = Cursor::pos();
+ QToolTip::showText(pos, text);
+}
+
+void DecoratedClientImpl::requestHideToolTip()
+{
+ QToolTip::hideText();
+}
+
void DecoratedClientImpl::requestShowWindowMenu()
{
// TODO: add rect to requestShowWindowMenu
diff --git a/decorations/decoratedclient.h b/decorations/decoratedclient.h
index e01a2e6a05..5323a00413 100644
--- a/decorations/decoratedclient.h
+++ b/decorations/decoratedclient.h
@@ -72,6 +72,8 @@ public:
bool hasApplicationMenu() const override;
bool isApplicationMenuActive() const override;
+ void requestShowToolTip(const QString &text) override;
+ void requestHideToolTip() override;
void requestClose() override;
void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override;
diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp
index 2a022473f2..c5856ebd5f 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp
+++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp
@@ -351,6 +351,16 @@ void PreviewClient::setBordersTopEdge(bool enabled)
emit bordersTopEdgeChanged(enabled);
}
+void PreviewClient::requestShowToolTip(const QString &text)
+{
+ qDebug() << "tooltip show requested with text:" << text;
+}
+
+void PreviewClient::requestHideToolTip()
+{
+ qDebug() << "tooltip hide requested";
+}
+
void PreviewClient::requestClose()
{
emit closeRequested();
diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h
index 8fb681e1ef..df3608393e 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h
+++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h
@@ -97,6 +97,8 @@ public:
bool hasApplicationMenu() const override;
bool isApplicationMenuActive() const override;
+ void requestShowToolTip(const QString &text) override;
+ void requestHideToolTip() override;
void requestClose() override;
void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override;