From aa215e12ccdc1231a556020dfc8ddf011fa717e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 6 Jun 2016 15:19:28 +0200 Subject: [PATCH] Expose the transientFor relationship to PlasmaWindowInterface Test Plan: Compiles Reviewers: #kwin, #plasma_on_wayland, hein Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D1780 --- abstract_client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/abstract_client.cpp b/abstract_client.cpp index 1e3a758451..af84c36ed9 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -681,6 +681,7 @@ void AbstractClient::setupWindowManagementInterface() w->setResizable(isResizable()); w->setMovable(isMovable()); w->setVirtualDesktopChangeable(true); // FIXME Matches Client::actionSupported(), but both should be implemented. + w->setParentWindow(transientFor() ? transientFor()->windowManagementInterface() : nullptr); connect(this, &AbstractClient::skipTaskbarChanged, w, [w, this] { w->setSkipTaskbar(skipTaskbar()); @@ -721,6 +722,11 @@ void AbstractClient::setupWindowManagementInterface() } ); connect(this, &AbstractClient::shadeChanged, w, [w, this] { w->setShaded(isShade()); }); + connect(this, &AbstractClient::transientChanged, w, + [w, this] { + w->setParentWindow(transientFor() ? transientFor()->windowManagementInterface() : nullptr); + } + ); connect(w, &PlasmaWindowInterface::closeRequested, this, [this] { closeWindow(); }); connect(w, &PlasmaWindowInterface::moveRequested, this, [this] {