From 94b5ca0d2ba0dc3ea73617c10810865e7f63dd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 13 Oct 2015 13:24:56 +0200 Subject: [PATCH] TabSynchronizer operates on AbstractClient Change required to get methods using TabSynchronizer moved to AbstractClient. Unfortunately we need to cast to Client when calling updateStates. It's save as if it's not a Client we a) don't have a tabGroup in the first place b) the check if (main == only) will hit and the method returns --- geometry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 2e8a5d8dd3..f98077ce4b 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2139,7 +2139,7 @@ void AbstractClient::setMaximize(bool vertically, bool horizontally) class TabSynchronizer { public: - TabSynchronizer(Client *client, TabGroup::States syncStates) : + TabSynchronizer(AbstractClient *client, TabGroup::States syncStates) : m_client(client) , m_states(syncStates) { if (client->tabGroup()) @@ -2153,12 +2153,12 @@ public: { if (m_client && m_client->tabGroup()) { m_client->tabGroup()->blockStateUpdates(false); - m_client->tabGroup()->updateStates(m_client, m_states); + m_client->tabGroup()->updateStates(dynamic_cast(m_client), m_states); } m_client = 0; } private: - Client *m_client; + AbstractClient *m_client; TabGroup::States m_states; };