From 1727ab12116ac6cde4161a2f004897c77d875a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 29 Dec 2012 15:36:55 +0100 Subject: [PATCH] skip reset states if client untabbed for release BUG: 299333 FIXED-IN: 4.10 REVIEW: 108003 --- client.cpp | 4 +++- client.h | 2 +- workspace.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client.cpp b/client.cpp index b555c11cc6..43296b3a06 100644 --- a/client.cpp +++ b/client.cpp @@ -1849,13 +1849,15 @@ bool Client::tabTo(Client *other, bool behind, bool activate) return true; } -bool Client::untab(const QRect &toGeometry) +bool Client::untab(const QRect &toGeometry, bool clientRemoved) { TabGroup *group = tab_group; if (group && group->remove(this)) { // remove sets the tabgroup to "0", therefore the pointer is cached if (group->isEmpty()) { delete group; } + if (clientRemoved) + return true; // there's been a broadcast signal that this client is now removed - don't touch it setClientShown(!(isMinimized() || isShade())); bool keepSize = toGeometry.size() == size(); bool changedSize = false; diff --git a/client.h b/client.h index e8ae850deb..9e261280a9 100644 --- a/client.h +++ b/client.h @@ -556,7 +556,7 @@ public: * WARNING: non dynamic properties are ignored - you're not supposed to alter/update such explicitly */ Q_INVOKABLE void syncTabGroupFor(QString property, bool fromThisClient = false); - Q_INVOKABLE bool untab(const QRect &toGeometry = QRect()); + Q_INVOKABLE bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false); /** * Set tab group - this is to be invoked by TabGroup::add/remove(client) and NO ONE ELSE */ diff --git a/workspace.cpp b/workspace.cpp index f80649da26..366043168b 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -663,7 +663,7 @@ void Workspace::removeClient(Client* c, allowed_t) m_userActionsMenu->close(); } - c->untab(); + c->untab(QRect(), true); if (client_keys_client == c) setupWindowShortcutDone(false);