From 23b19b4efea03624aa1cccdaa429686fac298bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 21 May 2015 10:31:19 +0200 Subject: [PATCH] [wayland] Add a bool ShellClient::isInternal Helper method to identify whether a ShellClient is for one of KWin's internal connections (e.g. a QWindow). --- shell_client.cpp | 6 ++++++ shell_client.h | 1 + 2 files changed, 7 insertions(+) diff --git a/shell_client.cpp b/shell_client.cpp index bfa5aed82d..80f23f8f29 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -377,4 +377,10 @@ void ShellClient::updateInternalWindowGeometry() setGeometry(m_internalWindow->geometry()); } +bool ShellClient::isInternal() const +{ + return m_shellSurface->client() == waylandServer()->internalConnection() || + m_shellSurface->client() == waylandServer()->qtConnection(); +} + } diff --git a/shell_client.h b/shell_client.h index 86e5a16c77..9c0cf2fcb0 100644 --- a/shell_client.h +++ b/shell_client.h @@ -90,6 +90,7 @@ public: quint32 windowId() const { return m_windowId; } + bool isInternal() const; protected: void addDamage(const QRegion &damage) override;