From 1659c0b6412a7de2163f06b02c7c3752c3b945c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 Dec 2015 13:31:25 +0100 Subject: [PATCH] Move triggerDecorationRepaint from Client to AbstractClient --- abstract_client.cpp | 9 +++++++++ abstract_client.h | 1 + client.cpp | 9 --------- client.h | 1 - 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 139659ed52..c2b9ea8910 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -57,6 +57,8 @@ AbstractClient::AbstractClient() connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::moveResizedChanged); connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::removeCheckScreenConnection); connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::setupCheckScreenConnection); + + connect(this, &AbstractClient::paletteChanged, this, &AbstractClient::triggerDecorationRepaint); } AbstractClient::~AbstractClient() @@ -1320,4 +1322,11 @@ bool AbstractClient::decorationHasAlpha() const return true; } +void AbstractClient::triggerDecorationRepaint() +{ + if (isDecorated()) { + decoration()->update(); + } +} + } diff --git a/abstract_client.h b/abstract_client.h index 96d006d748..4fe5a67af8 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -496,6 +496,7 @@ public: return m_decoration != nullptr; } bool decorationHasAlpha() const; + void triggerDecorationRepaint(); // TODO: remove boolean trap static bool belongToSameApplication(const AbstractClient* c1, const AbstractClient* c2, bool active_hack = false); diff --git a/client.cpp b/client.cpp index 47221ca807..d2a8b6798e 100644 --- a/client.cpp +++ b/client.cpp @@ -154,8 +154,6 @@ Client::Client() client_size = QSize(100, 100); ready_for_painting = false; // wait for first damage or sync reply - connect(this, &Client::paletteChanged, this, &Client::triggerDecorationRepaint); - connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption); connect(options, &Options::condensedTitleChanged, this, &Client::updateCaption); @@ -440,13 +438,6 @@ void Client::destroyDecoration() m_decoInputExtent.reset(); } -void Client::triggerDecorationRepaint() -{ - if (isDecorated()) { - decoration()->update(); - } -} - void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const { if (!isDecorated()) { diff --git a/client.h b/client.h index 7342644ae7..a1a2f10921 100644 --- a/client.h +++ b/client.h @@ -231,7 +231,6 @@ public: void takeFocus() override; void updateDecoration(bool check_workspace_pos, bool force = false); - void triggerDecorationRepaint(); void updateShape();