Move triggerDecorationRepaint from Client to AbstractClient

icc-effect-5.14.5
Martin Gräßlin 2015-12-03 13:31:25 +01:00
parent 0a82746f91
commit 1659c0b641
4 changed files with 10 additions and 10 deletions

View File

@ -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();
}
}
}

View File

@ -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);

View File

@ -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()) {

View File

@ -231,7 +231,6 @@ public:
void takeFocus() override;
void updateDecoration(bool check_workspace_pos, bool force = false);
void triggerDecorationRepaint();
void updateShape();