From 11e0e75fb37104b4775c3a462796cc2422aa2807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 10 Jun 2015 17:45:59 +0200 Subject: [PATCH] Add a signal Toplevel::windowHidden Signal is connected in ScriptingModel together with windowShown. --- scripting/scripting_model.cpp | 2 ++ shell_client.cpp | 1 + toplevel.h | 1 + 3 files changed, 4 insertions(+) diff --git a/scripting/scripting_model.cpp b/scripting/scripting_model.cpp index 503a916319..e92605097b 100644 --- a/scripting/scripting_model.cpp +++ b/scripting/scripting_model.cpp @@ -74,6 +74,8 @@ void ClientLevel::setupClientConnections(AbstractClient *client) connect(client, &AbstractClient::desktopChanged, this, check); connect(client, &AbstractClient::screenChanged, this, check); connect(client, &AbstractClient::activitiesChanged, this, check); + connect(client, &AbstractClient::windowHidden, this, check); + connect(client, &AbstractClient::windowShown, this, check); } void ClientLevel::checkClient(AbstractClient *client) diff --git a/shell_client.cpp b/shell_client.cpp index 194de2c92c..9d75d12099 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -538,6 +538,7 @@ void ShellClient::unmap() ready_for_painting = false; addWorkspaceRepaint(visibleRect()); workspace()->clientHidden(this); + emit windowHidden(this); } void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface) diff --git a/toplevel.h b/toplevel.h index 3aea1bc0c3..027b089a4a 100644 --- a/toplevel.h +++ b/toplevel.h @@ -380,6 +380,7 @@ Q_SIGNALS: void paddingChanged(KWin::Toplevel* toplevel, const QRect& old); void windowClosed(KWin::Toplevel* toplevel, KWin::Deleted* deleted); void windowShown(KWin::Toplevel* toplevel); + void windowHidden(KWin::Toplevel* toplevel); /** * Signal emitted when the window's shape state changed. That is if it did not have a shape * and received one or if the shape was withdrawn. Think of Chromium enabling/disabling KWin's