Commit 1659c0b6 authored by Martin Flöser's avatar Martin Flöser

Move triggerDecorationRepaint from Client to AbstractClient

parent 0a82746f
......@@ -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();
}
}
}
......@@ -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);
......
......@@ -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()) {
......
......@@ -231,7 +231,6 @@ public:
void takeFocus() override;
void updateDecoration(bool check_workspace_pos, bool force = false);
void triggerDecorationRepaint();
void updateShape();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment